program main
  implicit none
  integer i,N
  real(8) ans,a,b
  read(*, *) N
  !read(*, *) (L(i), i = 1,N)
  if (mod(N,2) == 0) then
    ans = 0.5
  else
  	a = N+1
    b = 2*N
    ans = a/b
  end if
  write(*, *) ans
end program main
