#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define be(v) v.begin(), v.end()
#define ll long long
ll INF = 1e9;
ll mod = 1e9+7;

ll dp[10001];
ll a[10001];
int main() {
  int n,m; cin >> n >> m;
  vector<bool> aa(n,false);
  rep(i,m) {
  	cin >> a[i];
  	aa[i]=true;
  }
  rep(i,n) dp[i] = 0;
  dp[0]=1;
  rep(i,n) {
  	for(int j=i+1;j<=min(n,i+2);j++){}
  	if(aa[i]==false) {
  		dp[j] += dp[i];
  		dp[i] %= mod;
  	}
  }
  cout << dp[n] << endl;
}
