#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
int N, M;
vector<int> a(100100, true);
int main(void) {
  cin >> N >> M;
  long long dp[100010];
  for (int i = 0; i < M; ++i) {
    int b;
    cin >> b;
    a[b] = false;
  }
  dp[0] = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = i + 1; j <= min(N, i + 2); j++) {
      if (a[j]) {
        dp[j] += dp[i];
        dp[j] %= 1000000007;
      }
    }
  }
  cout << dp[N] << endl;
  return 0;
}
