#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <queue>
#include <stack>
#include <algorithm>
#include <limits>
#include <numeric>
#include <cassert>

#define seq(i, n) for (int i = 0; i < (n); i++)
#define seq2(i, f, t) for (int i = (f); i < (t); i++)
#define rev(i, n) for (int i = (n); i >= 0; i--)
#define rev2(i, f, t) for (int i = (f); i >= (t); i--)
#define all(x) (x).begin(),(x).end()
#define max(x, y) ((x) > (y) ? (x) : (y))
#define min(x, y) ((x) < (y) ? (x) : (y))

using namespace std;

using ll = long long;

ll dp[101000];

ll solve(int n, int m, vector<int> b) {
  for (int k:b){
    dp[k]=-1ll;
  }
  if(dp[n-1]!=-1){
    dp[n-1]=1; 
  }
  if(dp[n-2]!=-1) {
    dp[n-2]=1 + max(0,dp[n-1]);
  }
  rev2(i,n-3,0){
    if(dp[i] != -1)
      dp[i] = max(0,dp[i+1]) + max(0,dp[i+2]) % 1'000'000'007;
    else
      dp[i] = 0;
  }
  return dp[0];
}

int main() {
#ifdef TEST
  assert(solve(6, 1, {3}) == 4); 
  assert(solve(10, 2, {4, 5}) == 0); 
  assert(solve(100, 5, {1, 23, 45, 67, 89}) == 608200469); 
  assert(solve(1, 0, {}) == 1); 
  assert(solve(2, 1, {1}) == 1); 
#else
  int n,m;
  cin >> n >> m;
  vector<int> v;
  seq(_,m){
    int d;
    cin >> d;
    v.push_back(d);
  }
  cout << solve(n,m,v);
#endif

  return 0;
}
