#include <iostream>
#include <vector>
 
using namespace std;
 
int main(){
  int N,M;
  cin >> N >> M;
  vector<int> a;
  a.push_back(-1);
  int b;
  cin >> b;
  a.push_back(b);
  int  beforeEmpty=b;
  for(int i=1;i<M;i++){
    int s;
    cin >> s;
    if(beforeEmpty+1==s){
      cout << 0;
      return 0;
    }
	a.push_back(s);
    beforeEmpty=s;
  }
  a.push_back(N+1);
	vector<int> buf;
	buf.push_back(1);
	buf.push_back(1);
  for(int i=2;i<N;i++){
  	int push=buf[i-1]+buf[i-2];
    for(int j=0;j<a.size();j++){
      if(i==a[j]){
        push=0;
        break;
      }
    }
    buf.push_back(push);
  }
  cout << ans;
}
