#include <bits/stdc++.h>
using namespace std;
long long read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int N = 1e9 + 7;
long long n, m, step = 0, ans = 0;
map<long long, long long> mp;
void dfs(long long level) {
  if (level > n) return;
  if (mp[level] == 1) return;
  if (level == n) {
    ans++;
    ans = ans % N;
    return;
  }
  dfs(level + 1);
  dfs(level + 2);
}
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= m; i++) {
    long long t = read();
    mp[t] = 1;
  }
  dfs(0);
  cout << ans;
}
