#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long dp[100010];
bool am[100010];
int main() {
  long long n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> m;
    am[m] = true;
  }
  dp[0] = 0;
  for (int i = 0; i < n - 2; i++) {
    if (!am[i + 1] && dp[i] != 0) {
      dp[i + 1] += dp[i];
    }
    if (!am[i + 2] && dp[i] != 0) {
      dp[i + 2] += dp[i];
    }
  }
  if (dp[n - 2] != 0) {
    dp[n - 1] += dp[n - 2];
  }
  cout << dp[n - 1] % MOD << endl;
  return 0;
}
