t = 1
# t = input()
# t = int(t)
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	n = input()
	n =int(n)
	ans = 0.5
	if n%2 == 1:
		# print("a")
		ans = (n//2 + 1.0)/(n*1.0)
	print(ans)
	# n,x = map(int,input().strip().split())
	# v = list(map(int,input().strip().split()))[0:n]
	# m = {}
	# for i in v:
	# 	temp = x/i
	# 	if(x%i != 0):
	# 		temp += 1
	# 	m[i] += 1
	# ans = 0
	# rem = 0 t = 1 t 1 def max(a,b):
	if a > b:
		return a
	return b max if a > b:
		return a
	 a > b a b return a a return b b a a b b while t > 0:
	t -= 1
	n = input()
	n =int(n)
	ans = 0.5
	if n%2 == 1:
		# print("a")
		ans = (n//2 + 1.0)/(n*1.0)
	print(ans)
	# n,x = map(int,input().strip().split())
	# v = list(map(int,input().strip().split()))[0:n]
	# m = {}
	# for i in v:
	# 	temp = x/i
	# 	if(x%i != 0):
	# 		temp += 1
	# 	m[i] += 1
	# ans = 0
	# rem = 0 t > 0 t 0 t -= 1 t 1 n = input() n input() input n =int(n) n int(n) int n ans = 0.5 ans 0.5 if n%2 == 1:
		# print("a")
		ans = (n//2 + 1.0)/(n*1.0)
	 n%2 == 1 n%2 n 2 1 ans = (n//2 + 1.0)/(n*1.0) ans (n//2 + 1.0)/(n*1.0) n//2 + 1.0 n//2 n 2 1.0 n*1.0 n 1.0 print(ans) print ans t -= 1 1 t n =int(n) int(n) n ans = 0.5 0.5 ans n = input() input() n ans = (n//2 + 1.0)/(n*1.0) (n//2 + 1.0)/(n*1.0) ans t = 1 1 t def max(a,b):
	if a > b:
		return a
	return b def max(a,b):
	if a > b:
		return a
	return b max
t = 1
# t = input()
# t = int(t)
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	n = input()
	n =int(n)
	ans = 0.5
	if n%2 == 1:
		# print("a")
		ans = (n//2 + 1.0)/(n*1.0)
	print(ans)
	# n,x = map(int,input().strip().split())
	# v = list(map(int,input().strip().split()))[0:n]
	# m = {}
	# for i in v:
	# 	temp = x/i
	# 	if(x%i != 0):
	# 		temp += 1
	# 	m[i] += 1
	# ans = 0
	# rem = 0
