#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int n, m;
int a[100100];
int res[100100];
int f(int x) {
  if (res[x] != -1)
    return res[x];
  else if (x == n - 1 || x == n - 2)
    return res[x] = n - x;
  else if (a[x])
    return res[x] = 0;
  else
    return res[x] = (f(x + 1) + f(x + 2)) % MOD;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int y;
    cin >> y;
    a[y] = 1;
    if (a[y - 1]) {
      cout << "0" << endl;
      return 0;
    }
  }
  memset(res, -1, sizeof(res));
  cout << f(0) << endl;
  return 0;
}
