long dp[1<<17],mod=(long)1e9+7;
inline void solve(void){
  long N,M;
  in(N,M);
  long a;
  rep(i,M){
    in(a);
    dp[a]=-1;
  }
  if(dp[1]==-1&&dp[2]==-1){
    out(0);
    return;
  }
  dp[1]=dp[1]!=-1?1:-1;
  if(dp[2]!=-1&&dp[1]!=-1)dp[2]=2;
  else if(dp[1]==-1)dp[2]=1;
  up(i,3,N){
    if(dp[i]==-1)continue;
    if(dp[i-1]!=-1)dp[i]+=dp[i-1],dp[i]%=mod;
    if(dp[i-2]!=-1)dp[i]+=dp[i-2],dp[i]%=mod;
  }
  out(dp[N]);
}