L = int(input()) N = int(input()) S = input().split() ans = 2 ** (L-3) * len(S) print(ans)