import sys

N,M=map(int,input().split())
a=[int(input()) for i in range(M)]
c=[0]*(N+1)
c[0]=1
MOD=7+10**9
if M==0:
    c[1]=1
    for i in range(1,N):
        c[i+1]=c[i]+c[i-1]
    print(c[N])
else:
    j=0
    for i in range(1,N+1):
        if j<M and i==a[j]:
            j+=1
        elif i==1:
            c[i]=1
        else:
            c[i]=(c[i-1]+c[i-2])%MOD
    print(c[-1]%MOD)
            