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


if __name__ == '__main__':
    solve() def solve():
    n = int(input())
    if n % 2 == 0:
        print(0.5)
    else:
        print(((n+1)//2) / n) solve n = int(input()) n int(input()) int input() input if n % 2 == 0:
        print(0.5)
    else:
        print(((n+1)//2) / n) n % 2 == 0 n % 2 n 2 0 print(0.5) print 0.5 print(((n+1)//2) / n) print ((n+1)//2) / n (n+1)//2 n+1 n 1 2 n if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def solve():
    n = int(input())
    if n % 2 == 0:
        print(0.5)
    else:
        print(((n+1)//2) / n) def solve():
    n = int(input())
    if n % 2 == 0:
        print(0.5)
    else:
        print(((n+1)//2) / n) solve
def solve():
    n = int(input())
    if n % 2 == 0:
        print(0.5)
    else:
        print(((n+1)//2) / n)


if __name__ == '__main__':
    solve()
