program main
	implicit none
    integer(8)::n
    read(*,*)n
    if(mod(n,2)==0)then
    	write(*,*) 0.5
    else if(n==1)then
    	write(*,*) 1
    else
    	write(*,*) (n/2 +1)/real(n,8)
    end if
    stop
end program main
