import bisect,math
target=10**12
epsilon=10**(-10)
def C(a,b):
if a>b:
a,b=b,a
x=[0]
i=j=0
d=[1]
while True:
pv=x[-1]
while x[i]+a<=pv+epsilon:
i+=1
while x[j]+b<=pv+epsilon:
j+=1
v=min(x[i]+a,x[j]+b)
x.append(v)
s=1
if v>=a:
s+=d[bisect.bisect(x,v-a+epsilon)-1]
if v>=b:
s+=d[bisect.bisect(x,v-b+epsilon)-1]
if s>=target:
return v
d.append(s)
f=[0,1]
for i in range(30):
f.append(f[-1]+f[-2])
print(f"{sum(C(math.sqrt(k),math.sqrt(f[k])) for k in range(1,31)):.8f}")