n,k=map(int,input().split())
d=[]
s=[0]*n
for i in range(k):
    d.append(int(input()))

if 1 in d:
    s[0]=0
else:
    s[0]=1

if 2 in d:
    s[1]=0
else:
    s[1]= s[0]+1


for i in range(2,n):
    if i+1 in d:
        s[i]=0
    else:
        s[i]=s[i-1]+s[i-2]

print( s[n-1] % (1000000007))
