#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dp[1100];
long long dfs(int here, int n) {
  if (dp[here] >= 0) {
    return dp[here];
  }
  long long res = 0;
  if (here == n) {
    return dp[here] = 1;
  }
  if (here > n) return dp[here] = 0;
  res += (dfs(here + 1, n) % mod);
  res += (dfs(here + 2, n) % mod);
  return dp[here] = (res % mod);
}
int main() {
  memset(dp, -1, sizeof(dp));
  int N, M;
  cin >> N >> M;
  int _a;
  for (int i = 0; i < M; ++i) {
    cin >> _a;
    dp[_a] = 0;
  }
  cout << dfs(0, N) % 1000000007 << endl;
  return 0;
}
