#Python TQC考題310 迴圈公式計算
n=eval(input())
sum=0
for i in range(2,n+1):
sum=sum+1/((i-1)**0.5+i**0.5)
print(“{:.4f}”.format(sum))
#第二次做
n=eval(input())
sum=0
for i in range(1,n):
#range(1,n) 是逗點不是 :
# 起始值1, 終值n還是n+1,
# 就試試看答案正確與否
sum=sum+1/(i**0.5+(i+1)**0.5)
#是i, 不是n
print(“{:.4f}”.format(sum))
n=eval(input())
sum=0
for i in range(1,n):
sum=sum+1/(i**0.5+(i+1)**0.5)
print(“%.4f” %sum)