#include <bits/stdc++.h>
using namespace std;
int z[100001];
int n, k, ans;
bool vis[100001];
void dfs(int num) {
  if (num == n) {
    ans++;
    ans %= 1000000007;
    return;
  }
  if (vis[num + 1] == false && num + 1 <= n) {
    vis[num + 1] = true;
    dfs(num + 1);
    vis[num + 1] = false;
  }
  if (vis[num + 2] == false && num + 2 <= n) {
    vis[num + 2] = true;
    dfs(num + 2);
    vis[num + 2] = false;
  }
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    cin >> z[i];
    vis[z[i]] = true;
  }
  dfs(0);
  cout << ans << endl;
}
