n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
s=[0]*(n+1)
s[0]=1
for i in range(1,n+1):
    if a.count(i)!=0:
        s[i]=0
    else:
        if i-2>=0:
            s[i]+=s[i-1]+s[i-2]
        else:
            s[i]+=s[i-1]
print(s[n]%1000000007)
        
