#include <bits/stdc++.h>
#pragma GCC optimize "-O3"
#pragma GCC target("avx")
signed gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
using namespace std;
const long long mod = 1e9 + 7;
void run();
signed tansaku(long long now);
signed vector_finder(vector<long long> vec, long long number);
void init() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
}
long long ans = 0;
vector<long long> a(1);
long long n, m;
signed main() {
  init();
  run();
}
void run() {
  cin >> n >> m;
  a.resize(m);
  for (long long i = 0; i != m; ++i) cin >> a[i];
  tansaku(0);
  ans %= mod;
  cout << ans << endl;
}
signed tansaku(long long now) {
  if (vector_finder(a, now)) return 0;
  if (now >= n - 1) {
    ans++;
    return 0;
  }
  tansaku(now + 1);
  tansaku(now + 2);
}
signed vector_finder(vector<long long> vec, long long 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;
  }
}
