# coding: utf-8 # yukicoder No.175 simpleDNA L = int(input()) N = int(input()) print(2 ** (L - 3) * N)