N=int(input()) N//=2 H=1 for i in range (N): H*=3 H-=1 H/=2 print (int(H))