program sample
	implicit none
    real(8) :: N
    
    read(*,*) N
    
	if (mod(int(N,8),2)==0) then
    	write(*,*) real(1,8)/2_8
	else
    	write(*,*) (N+1)/(2*N)
    end if

	stop
end program sample

