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

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

print(fibo[-1])