#include <iostream>
using namespace std;

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> broken<N>;
  
  for (int i=0;i<M<i++){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  vector<int> dp<N+1>;
  const int mod =1000000007;
  dp[N]=1;
  for (int i=N-1;N>=0;i--){
    if (broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i] = dp[i+1]+dp[i+2]%mod;
  }
  cout << dp[0] <<endl;
}
  
  
  