n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
ans = [1]*(n+1)
for i in range(1,n+1):
    if i in a:
        ans[i] = 0
    elif i == 1:
        continue
    else:
        ans[i] = (ans[i-1]+ans[i-2])%1000000007
print(ans[n])