#include <bits/stdc++.h>
using namespace std;
int gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool broken[100000] = {false};
int dp[100000] = {};
int main() {
  int n = 0, m = 0;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int temp;
    cin >> temp;
    broken[temp] = true;
  }
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j <= min(i + 2, n); j++) {
      if (broken[j] == false) {
        dp[j] += dp[i];
        dp[j] %= 1000000000 + 7;
      }
    }
  }
  cout << dp[n] << endl;
}
