l = int(input()) n = int(input()) print(2**(l-3) * n)