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