n,m = map(int,input().split())
cnt=[]
l=[int(input()) for _ in range(m)]
for i in range(n+1):
    cnt.append(0)
cnt[0]=1
l.sort()
for i in range(1,n+1):
    fl=False
    j=0
    while(j<m):
        t=l[j]
        if t==i:
            fl=True
            break
        if t>i:
            break
        j+=1
    if fl:
        cnt[i]=0
        continue
    else:
        cnt[i]+=cnt[i-1]
        if i>1:
            cnt[i]+=cnt[i-2]
#print(cnt)
print(cnt[n]%1000000007)

