n,m=map(int,input().split())
q=[int(input()) for i in range(m)]
mod=10**9+7

for i in range(1,n+1):
  if i==1:
    if i not in q:
      a=1
      b=1
    else:
      a=1
      b=0
  else:
    if i in q:
      a,b=b,0
    else:
      a,b=b,(a+b)%mod
print(b)