n,m=map(int,input().split())
a=[]
for i in range(m):
    A=int(input())
    a.append(A)
b=[1]
ans=1
for i in range(1,n+1):
    if i in a:
        b.append(0)
        ans*=b[i-1]
        ans=ans%1000000007
        if len(b)!=1:
            if b[i-1]==0:
                ans=0
                break
    else:
        if i==1 or b[i-1]==0:
            b.append(1)
        else:
            b.append(b[i-1]+b[i-2])
ans*=b[len(b)-1]
print(ans%1000000007)