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