n,m=map(int,input().split())
lis=[]
ans=[1]
for i in range(m):
    lis.append(int(input()))
a=0
if m>=2:
    for i in range(m-1):
        if  lis[i]+1==lis[i+1]:
            a=1
            break
if a==0:
    for i in range(n):
        ans.append(0)

    if 1 not in lis:
        ans[1]=1

    for i in range(n-1):
        if i+2 not in lis:
            ans[i+2]=ans[i]+ans[i+1]

print(ans[n]%(10**9+7))
