n,m=map(int,input().split())
a=[int(input()) for i in range(m)]

ans=0
MOD= 1000000007

c=[0]*(n+1)
c[0]=1
if 1 in a:
    c[1]=0
else:
    c[1]=1

for i in range(2,n+1):
    c[i]+=(c[i-1]+c[i-2])%MOD
    if i in a:
        continue

print(c[n]%MOD)