n,m=map(int,input().split())
lis=[]
ans=[1]
for i in range(m):
    lis.append(int(input()))
for i in range(n):
    ans.append(0)

if 1 not in lis:
    ans[1]=1

for i in range(n-1):
    if i+2 not in lis:
        ans[i+2]=ans[i]+ans[i+1]

print(ans[n]%(10**9+7))
