import sys
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
ans=[]
for i in range(m-1):
    if a[i+1]-a[i]==1:
        print(0)
        sys.exit()
ans=[0 for i in range(n+5)]
ans[1]=1
ans[2]=2
if 1 in a:
    ans[1]=0
    ans[2]=1
if 2 in a:
    ans[2]=0
for i in range(1,n+3):
    if i+2 in a:
        ans[i+2]=0
    else:
        ans[i+2]=ans[i+1]%1000000007+ans[i]%1000000007
   
print(ans[n]%1000000007)
    
    
    

        
