#include <iostream>
#include <vector>
using namespace std;

bool IsFind(vector<int> &v, int val)
{
  	int size = v.size();
  	for(int i = 0; i < size; i++)
    {
  		if(v[i] == val)
        {
         	 return true;
        }
    }
  	return false;
}

int main(void){
  int n, G;
  string token1, token2;

  cin >> G >> n;  
  vector<int> ret;
  long T[G+1] = {};
  
  for(int i = 0; i < n; i++) {
    int r;
    cin >> r;
    ret.push_back(r);
  }

  T[0] = 1;
  T[1] = 1;   
  
  if(IsFind(ret, 1)){ T[1] = 0; }
  
  for(int i = 2; i < G+1; i++)
  {
    if(IsFind(ret, i)){ T[i] = 0; }
    else { T[i] = T[i-1] + T[i-2];}
    //cout << i << " "<< T[i] << "\n";
  }
  //cout << T[1] << "\n";
  //cout << G << "\n";
  cout << (T[G] % 1000000007);
  return 0;
}