#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  long long dp[100001];
  int a = 0;
  for (int i = 0; i < m; ++i) {
    cin >> a;
    dp[a] = -1;
  }
  const long long mod = 1000000007;
  dp[0] = 1;
  for (int i = 0; i < n; ++i) {
    if (dp[i] == -1) {
      continue;
    }
    if (dp[i + 1] != -1) {
      dp[i + 1] += dp[i];
      dp[i + 1] %= mod;
    }
    if (dp[i + 2] != -1) {
      dp[i + 2] += dp[i];
      dp[i + 2] %= mod;
    }
  }
  cout << dp[n] << endl;
  return 0;
}
