#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define FOR(NAME, START, NUM) for (ll NAME = START; NAME < (NUM); NAME++)
#define REP(NAME, NUM) for (ll NAME = 0; NAME < (NUM); NAME++)
#define BREP(NAME, NUM) for (ll NAME = (NUM)-1; NAME >= 0; NAME--)
#define ALL(NAME) (NAME).begin(), (NAME).end()
const ll INF =1000000000000000;

ll n,m,num,ans=0,pre = -1;
vector<ll> x(0);

void nya(int start){
  if(x.at(start) == 0 && start < n){
    ans++;
    if(ans >= 1000000007)
      ans %= 1000000007;
    nya(start+1);
    nya(start+2);
  }
  else{
    return;
  }
}

int main(){
  cin >> n >> m;
  REP(i,n){
    x.push_back(0)
  }
  REP(i,m){
    cin >> num;
    if(num - pre == 1){
      cout<<0<<endl;
      return 0;
    }
    pre = num;
    x.at(num) = 1;
  }
  nya(0);
  cout<<ans<<endl;
}
