#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int memo[110000];
int func(int n, vector<int> vec) {
  if (n == 0) return memo[n] = 1;
  if (n == 1) return memo[n] = func(0, vec);
  if (memo[n] != 0) return memo[n];
  for (int i = 0; i < vec.size(); ++i)
    if (n == vec[i]) return 0;
  return memo[n] = func(n - 1, vec) % mod + func(n - 2, vec);
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> vec;
  for (int i = 0; i < m; i++) {
    int temp;
    cin >> temp;
    vec.push_back(temp);
  }
  cout << func(n, vec) % (1000000007) << endl;
}
