n,m = map(int,input().split())
stair = []
for i in range(m):
    stair.append(int(input()))

ans = [0 for i in range(n+1)]
ans[0] = 1
ans[1] = 1
for i in range(n+1):
    if i==0:
        continue
        
    elif i in stair:
        ans[i] = 0
    else:
        ans[i] = ans[i-2] + ans[i-1]
print(ans[n])