from fractions import Fraction n=input() a=[Fraction(4),Fraction(3)]+[0]*n for i in range(2,n+1): a[i]=(19*a[i-1]-12*a[i-2])/4 print float(a[n])