N,M=map(int,input().split())
a=[]
for i in range(M):
    a.append(int(input()))
def story(n):
    if n in a:
        ans=0
    elif n==1:
        ans=1
    elif n==2:
        ans=2
    else:
        ans=(story(n-1)+story(n-2))%1000000007
    return ans
print(story(N))
