lis=list(map(int,input().split()))
alist=[-1]
for i in range(lis[1]):
    alist.append(int(input()))
alist.append(lis[0]+1)
flag=0
ans=0
for i in range(lis[1]):
    if alist[i+1]-alist[i]==1:
        flag=1
        break
if flag==0:
    steps=[0]*(lis[0]+1)
    if 1 in alist:
        steps[1]=0
        steps[2]=1
    elif 2 in alist:
        steps[1]=1
        steps[2]=1
    else:
        steps[1]=1
        steps[2]=2
    for i in range(3,lis[0]+1):
        if i in alist:
            steps[i]=steps[i-1]
            flag=2
        elif flag==2:
            steps[i]=steps[i-1]
            flag=3
        elif flag==3:
            steps[i]=steps[i-1]
            flag=0
        else:
            steps[i]=(steps[i-1]+steps[i-2])%((10**9)+7)
    ans=steps[-1]

print(ans)
