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