		IDENTIFICATION DIVISION.
        PROGRAM-ID. AtCoder.
      
        ENVIRONMENT DIVISION.
      
        DATA DIVISION.
        WORKING-STORAGE SECTION.
        01 INP PIC X(100).
        01 A PIC 9(15).
        01 D PIC ZZ9.999999.
        01 B PIC 9(10)V9(10).
        01 C PIC 9(15).
      	01 t PIC 9(15).
	    01 temp1 PIC 9(15).
        01 temp2 PIC 9(15).
        01 N PIC 9(15).
      
        PROCEDURE DIVISION.
      	MAIN.
			ACCEPT A.
      		MOVE A to B.
      		COMPUTE C = A / 2.
       		COMPUTE C = C * 2.
      		IF A = C THEN
      			MOVE 0.5 to B
      		ELSE
      			COMPUTE B = (B + 1.0) / (2.0 * B)
      		END-IF.
      		MOVE B to D.
			DISPLAY B.
		STOP RUN.