n,m=map(int,input().split())
ans=list(0 for _ in range(n))
a=list(int(input())for _ in range(m))
count=list(0 for _ in range(n+1))
ans=0
if n==1:
    ans=1
else:
    if 1 not in a:
        count[1]=1
    if 2 not in a:
        count[2]=count[1]+1
    for i in range(3,n+1):
        if i not in a:
            count[i]=count[i-1]+count[i-2]
            
    ans=count[n]
print(ans%(10**9+7))
           