def resolve():
    n = int(input())
    if n % 2 == 1:
        print((n//2+1)/n)
    else:
        print(n//2/n)
resolve() def resolve():
    n = int(input())
    if n % 2 == 1:
        print((n//2+1)/n)
    else:
        print(n//2/n) resolve n = int(input()) n int(input()) int input() input if n % 2 == 1:
        print((n//2+1)/n)
    else:
        print(n//2/n) n % 2 == 1 n % 2 n 2 1 print((n//2+1)/n) print (n//2+1)/n n//2+1 n//2 n 2 1 n print(n//2/n) print n//2/n n//2 n 2 n resolve() resolve def resolve():
    n = int(input())
    if n % 2 == 1:
        print((n//2+1)/n)
    else:
        print(n//2/n) def resolve():
    n = int(input())
    if n % 2 == 1:
        print((n//2+1)/n)
    else:
        print(n//2/n) resolve
def resolve():
    n = int(input())
    if n % 2 == 1:
        print((n//2+1)/n)
    else:
        print(n//2/n)
resolve()