#include <bits/stdc++.h>
using namespace std;
const int Mod = (int)1e9 + 7;
int mul(int a, int b) { return 1LL * a * b % Mod; }
const int MAXN = 100005;
int n;
int memo[MAXN];
set<int> st;
int count(int step) {
  if (step == n) return 1;
  if (st.find(step) != st.end()) return 0;
  int &ret = memo[step];
  if (~ret) return ret;
  ret = 0;
  ret += count(step + 1);
  ret %= Mod;
  ret += count(step + 2);
  ret %= Mod;
  return ret;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0), cout.precision(10),
      cout << fixed;
  int m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    st.insert(x);
  }
  memset(memo, -1, sizeof memo);
  cout << count(0) << '\n';
}
