def ILI(): return list(map(int, input().split())) L = int(input()) N = int(input()) S = input() lis = S.split(" ") print(2**(L-3) * len(lis))