#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<bool> broken(N, false);
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    broken[a - 1] = true;
  }
  vector<long long> num_move(N, 0);
  for (int i = 0; i < N; i++) {
    if (broken[i]) continue;
    if (i == 0) {
      num_move[0] = 1;
    } else if (i == 1) {
      num_move[1] = num_move[0] + 1;
    } else {
      num_move[i] = num_move[i - 2] + num_move[i - 1];
    }
  }
  cout << num_move[N - 1] % 1000000007 << endl;
  return 0;
}
