#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int MAXN = 1e5 + 1;
int n, m;
long long dp[MAXN];
bool visit[MAXN];
long long solve(int pos) {
  if (pos == n) return 1;
  if (visit[pos] || pos > n) return 0;
  long long& ret = dp[pos];
  if (ret != -1) return ret;
  ret = 0;
  ret += solve(pos + 1) % mod;
  ret += solve(pos + 2) % mod;
  return ret;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int val;
    cin >> val;
    visit[val] = true;
  }
  memset(dp, -1, sizeof(dp));
  cout << solve(0) << "\n";
  return 0;
}
