n = int(eval(input()))

if n % 2 == 0:

  print((0.5))

else:

  print(((n//2 + 1) / n))
n = int(eval(input()))

if n % 2 == 0:

    print((0.5))

else:

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

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

-    print(((n // 2 + 1) / n)) +    print(((n + 1) // 2 / n))