import sys

input = lambda: sys.stdin.readline().rstrip()


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

    print(ans)


if __name__ == '__main__':
    solve() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def solve():
    N = int(input())
    if N % 2 == 0:
        ans = 0.5
    else:
        ans = (N // 2 + 1) / N

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

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

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

    print(ans) solve input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input
import sys

input = lambda: sys.stdin.readline().rstrip()


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

    print(ans)


if __name__ == '__main__':
    solve()
