l = int(input()) n = int(input()) s_list = list(input().split()) res = 0 for i in range(n): res += 2 ** (l - 3) print(res)