def resolve():
    N = int(input())
    print((N//2+1)/N if N%2==1 else 0.5)
    
if '__main__' == __name__:
    resolve() def resolve():
    N = int(input())
    print((N//2+1)/N if N%2==1 else 0.5)
     resolve N = int(input()) N int(input()) int input() input print((N//2+1)/N if N%2==1 else 0.5) print (N//2+1)/N if N%2==1 else 0.5 N%2==1 N%2 N 2 1 (N//2+1)/N N//2+1 N//2 N 2 1 N 0.5 if '__main__' == __name__:
    resolve() '__main__' == __name__ '__main__' __name__ resolve() resolve def resolve():
    N = int(input())
    print((N//2+1)/N if N%2==1 else 0.5)
     def resolve():
    N = int(input())
    print((N//2+1)/N if N%2==1 else 0.5)
     resolve
def resolve():
    N = int(input())
    print((N//2+1)/N if N%2==1 else 0.5)
    
if '__main__' == __name__:
    resolve()