from sys import stdin

import numpy as np





# noinspection PyShadowingBuiltinsInspection



def main():

    n = int(eval(input()))

    if n % 2 == 0:

        print((0.5))

    else:

        m = (n + 1) / 2

        print((m / n))

    return





if __name__ == "__main__":

    main()
N = int(eval(input()))



if N % 2 == 0:

  ret = 0.5

else:

  ret = (N/2 + 0.5)/(N)

print(ret)
from sys import stdin
import numpy as np

# noinspection PyShadowingBuiltinsInspection
def main():
    n = int(eval(input()))
    if n % 2 == 0:
        print((0.5))
    else:
        m = (n + 1) / 2
        print((m / n))
    return


if __name__ == "__main__":
    main()

N = int(eval(input()))
if N % 2 == 0:
    ret = 0.5
else:
    ret = (N / 2 + 0.5) / (N)
print(ret)

-from sys import stdin -import numpy as np - -# noinspection PyShadowingBuiltinsInspection -def main(): -    n = int(eval(input())) -    if n % 2 == 0: -        print((0.5)) -    else: -        m = (n + 1) / 2 -        print((m / n)) -    return - - -if __name__ == "__main__": -    main() +N = int(eval(input())) +if N % 2 == 0: +    ret = 0.5 +else: +    ret = (N / 2 + 0.5) / (N) +print(ret)