#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
using in = int64_t;
const in INF=1<<30;

bool chmin(in &a,in b){
  if(a>b) {a=b;return 1;}
  return 0;
}

int main(){
   in n,m;
  vector<in> a(m);
  cin>>n>>m;
  rep(i,m) cin>>a.at(i);
  sort(all(a));
  in dp[100010];
  rep(i,n+1) dp[i] =INF;
  dp[1]=1;
  dp[2]=1;
  
  for(in i=3;i<=n;i++){
    if(i==a.at(0)){
      dp[i]=0;
      a.pop();
      continue;
    }
     dp[i]=dp[i-1]+dp[i-2];
  }
  cout<<(dp[n]%waru);
}
