N,M=map(int,input().split())
mod=10**9+7
n1=-1
n2=-1
stop=0
A=[]
for i in range(M):
  n1=n2
  n2=int(input())
  if n2-n1==1:
    stop=1
  A.append(n2)
#print(A,stop,sep="おい")
if stop==1:
  print("0")
else:
  next=0
  dp=[0 for i in range(N+1)]
  dp[0]=1
  dp[-1]=0
  for i in range(1,N+1):
    if i in A:
      dp[i]=1
      next=1
    elif next==1:
      dp[i]=dp[i-2]
      next=2
    elif next==2:
      dp[i]=dp[i-1]
      next=0
    else:
      dp[i]=(dp[i-1]+dp[i-2])%mod
  print(dp[N]%mod)
