# No.175 simpleDNA L = int(input()) N = int(input()) S = [s for s in input().split()] print(2 ** (L - 3) * len(S))