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((1-(n//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((1 - (n // 2) / n))

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