L=int(input ())
N=int(input())
S=input (). split ()
A=1
for i in range(L-1):
    A*=8
A*=N
print (A)