#include <bits/stdc++.h>
using namespace std;
int n, m, x;
set<int> s;
int a[100010];
int dfs(int step) {
  if (step == n) return 1ll;
  if (step > n) return 0ll;
  if (s.find(step) != s.end()) return 0ll;
  if (a[step] == 0) a[step] = dfs(step + 1) + dfs(step + 2);
  return a[step] % 1000000007;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> x;
    s.insert(x);
  }
  cout << dfs(0) << endl;
  return 0;
}
