N,M = map(int,input().split())
cnt = 0
lists = []
kaidan = list(range(N+1))
ans = []
for i in range(M):
    a = int(input())
    lists.append(a)

def dfs(i):
    if i == N:
        return cnt + 1
    
    if i > N:
        return False

    if i in lists:
        return False
    
    if dfs(i+1):
        return dfs(i+1)
    
    if dfs(i+2):
        return dfs(i+2)

    return False

m = dfs(0)
print(m+m)