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

fibo=[1,1]
mod=10**9+7
for i in range(n-1):
  if i in a:
    fibo[i]=0
    fibo[i+1]=(fibo[i-1]+fibo[i])%mod

  f=(fibo[-2]+fibo[-1])%mod
  fibo.append(f)
print(fibo[-1])