N,M=map(int,input().split())
mod=10**9+7
A=[]
for i in range(M):
  A.append(int(input()))
#print(A)
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:
    if next==1:
      break
    else:
      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)

