from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main() from sys import stdin, setrecursionlimit def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n) main input = stdin.buffer.readline input stdin.buffer.readline stdin.buffer stdin buffer readline n = int(input()) n int(input()) int input() input if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n) n % 2 == 0 n % 2 n 2 0 print(1 / 2) print 1 / 2 1 2 print((n // 2 + 1) / n) print (n // 2 + 1) / n n // 2 + 1 n // 2 n 2 1 n if __name__ == "__main__":
    setrecursionlimit(10000)
    main() __name__ == "__main__" __name__ "__main__" setrecursionlimit(10000) setrecursionlimit 10000 main() main def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n) def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n) main
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
