n=int(eval(input()))



print(((n//2+1)/n if n%2==1 else (n//2)/n))

n = int(eval(input()))

print((sum([x%2 == 1 for x in range(1, n+1)])/n))

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

n = int(eval(input()))
print((sum([x % 2 == 1 for x in range(1, n + 1)]) / n))

-print(((n // 2 + 1) / n if n % 2 == 1 else (n // 2) / n)) +print((sum([x % 2 == 1 for x in range(1, n + 1)]) / n))