#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  bool broken[100003] = {false};
  int mod = 1000000007;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    broken[a] = true;
  }
  int pre_num = 1;
  if (broken[1]) pre_num = 0;
  int pre_pre_num = 1;
  long long int tmp;
  for (int i = 2; i <= n; i++) {
    tmp = (pre_num + pre_pre_num) % mod;
    pre_pre_num = pre_num;
    pre_num = tmp;
    if (broken[i]) {
      pre_num = 0;
    }
  }
  cout << tmp % mod << endl;
}
