program kadai
implicit none
integer  ::  N
real(8)  ::  ans


read(*,*) N

if (mod(N,2)==0) then
    ans=0.5
else
    ans=(real(N,8)+1.0_8)/(2.0_8*real(N,8))
end if

write(*,*) ans
stop
contains
end program kadai
