x=int(input())

x-=1

ans=6

for i in range(x):

    ans=ans+ans+2

print(ans)

x=int(input())

ans=2

for i in range(x):

    ans=ans+ans+2

print(ans)
x = int(input())
x -= 1
ans = 6
for i in range(x):
    ans = ans + ans + 2
print(ans)

x = int(input())
ans = 2
for i in range(x):
    ans = ans + ans + 2
print(ans)

-x -= 1 -ans = 6 +ans = 2