#question1

N = eval(input())



if int(N) % 2 == 0:

  ans = 0.5

elif int(N) == 1:

  ans = 1

else:

  ans = ((int(N) - 1) /2 + 1) / int(N)



print(ans)
#question1

N = eval(input())



if int(N) % 2 == 0:

  ans = 0.5

else:

  ans = ((int(N) - 1) /2 + 1) / int(N)



print(ans)
# question1
N = eval(input())
if int(N) % 2 == 0:
    ans = 0.5
elif int(N) == 1:
    ans = 1
else:
    ans = ((int(N) - 1) / 2 + 1) / int(N)
print(ans)

# question1
N = eval(input())
if int(N) % 2 == 0:
    ans = 0.5
else:
    ans = ((int(N) - 1) / 2 + 1) / int(N)
print(ans)

-elif int(N) == 1: -    ans = 1