l = int(input()) n = int(input()) s = input().split() print(2**(l-3)*len(s))