l = int(input())#DNA長さ(3の倍数) n = int(input())#コドンのパターン数 s = list(input().split())#コドンのパターン print(2 ** (l - 3) * n)