n,m=map(int,input().split())
l=[-1]*(n+1)
for i in range(m):
    idx=int(input())
    l[idx]=0
mod=10**9+7
if l[1]==-1:
    if l[2]==-1:
        l[1]=1;l[2]=2
    else:
        l[1]==1
else:
    if l[2]==-1:
        l[2]=1

for i in range(3,n+1):
    if l[i]==-1:
        l[i]=(l[i-1]+l[i-2])%mod
    else:
        continue
print(l[-1])
