#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
int dfs(vector<int> &a, int N, int i) {
  int res;
  if (i > N || a[i] == 0) return 0;
  if (i == N) return 1;
  if (a[i] != -1) return a[i];
  res = dfs(a, N, i + 1) % mod + dfs(a, N, i + 2) % mod;
  return a[i] = res;
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a(N + 1, -1);
  for (int i = 0; i < M; i++) {
    int b;
    cin >> b;
    a[b] = 0;
  }
  cout << dfs(a, N, 0) << endl;
}
