from fractions import Fraction N=int(input()) A=[Fraction(4)]*(101) A[1]=Fraction(3) for i in range(2,N+1): A[i]=(19*A[i-1]-12*A[i-2])/4 ans=float(A[N]) print('{:.10f}'.format(ans))