n = int(eval(input()))

if n == 1:

  print((1))

elif n % 2 == 0:

  print((0.5))

else:

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

        
n = int(eval(input()))

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

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

-if n == 1: -    print((1)) -elif n % 2 == 0: -    print((0.5)) -else: -    print(((n + 1) / 2 / n)) +print((1 if n == 1 else 0.5 if n % 2 == 0 else (n + 1) / 2 / n))