k=int(input("repeticoes:"))
c=0
y=1
z=0
i=1
h=0
a=(12**0.5)
while(c<k):
	if(k>1):
		w=(((-1)**(i+1)))
		v=((1/(y*(3**(z)))))
		j=w*v
	else:
		j=a
	c=c+1
	z=z+1
	i=i+1
	y=y+2
	h=h+j
print(round((h*a), 8))