N,M=map(int,input().split())
a=list(map(int,open(0).read().split()))

b=[0]*(N+2)
b[0]=1
b[1]=1

for j in range(M):
    b[a[j]]=-1

for i in range(2,N+2):
    if b[i] !=-1:
        if b[i-1]!=-1:
            b[i]+=b[i-1]
        if b[i-2]!=-1:
            b[i]+=b[i-2]
print(b[-2]%(1000000007))