#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
ans=1
mod =10**9+7
dp = [0 for i in range(N+1)]
dp[0]=1
for i in range(1,N+1):
  if i not in a:
    if i==1:
      dp[i] = dp[i-1]%mod
    else:
      dp[i] = (dp[i-1]%mod+dp[i-2]%mod)%mod
  
print(dp[N]%mod)