#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int tansaku(int now);
int vector_finder(vector<int> vec, int number);
int ans = 0;
vector<int> a(1);
int n, m;
int main() {
  cin >> n >> m;
  a.resize(m);
  for (int i = 0; i < m; i++) cin >> a[i];
  tansaku(0);
  ans %= mod;
  cout << ans << endl;
}
int tansaku(int now) {
  if (vector_finder(a, now)) return 0;
  if (now >= n - 1) {
    ans++;
    return 0;
  }
  tansaku(now + 1);
  tansaku(now + 2);
}
int vector_finder(vector<int> vec, int number) {
  auto itr = find(vec.begin(), vec.end(), number);
  size_t index = distance(vec.begin(), itr);
  if (index != vec.size()) {
    return 1;
  } else {
    return 0;
  }
}
