#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> broken(100001, 0);
  for (int i = 0; i < m; i++) {
    int tmp;
    cin >> tmp;
    broken[tmp] = 1;
  }
  vector<int> dp(100001, 0);
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    vector<int> dp2(dp);
    for (int j = 1; j <= n; j++) {
      if (broken[j] != 1) {
        if (j == 1) {
          dp[1] = dp2[0];
        } else {
          dp[j] = (dp2[j - 1] + dp2[j - 2]) % 1000000007;
        }
      }
    }
  }
  cout << dp[n] << endl;
  return 0;
}
