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