def slove():

    import sys

    input = sys.stdin.readline

    n = int(input().rstrip('\n'))

    print(((n - n // 2) / n))





if __name__ == '__main__':

    slove()

import sys





def solve():

    readline = sys.stdin.buffer.readline

    mod = 10 ** 9 + 7

    n = int(readline())

    print(((n - n // 2) / n))





if __name__ == '__main__':

    solve()

def slove():
    import sys

    input = sys.stdin.readline
    n = int(input().rstrip("\n"))
    print(((n - n // 2) / n))


if __name__ == "__main__":
    slove()

import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10**9 + 7
    n = int(readline())
    print(((n - n // 2) / n))


if __name__ == "__main__":
    solve()

-def slove(): -    import sys +import sys -    input = sys.stdin.readline -    n = int(input().rstrip("\n")) + +def solve(): +    readline = sys.stdin.buffer.readline +    mod = 10**9 + 7 +    n = int(readline()) -    slove() +    solve()