# yukicoder No.175 simpleDNA 2020/02/04 l=int(input()) n=int(input()) s=input() print(2**(l-3)*n)