#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main(int argc, char *argv[]) {
  int N, M;
  bool a[100002];
  cin >> N >> M;
  for (int i = 0; i <= N; i++) {
    a[i] = true;
  }
  for (int i = 0; i < M; i++) {
    int b;
    cin >> b;
    a[b] = false;
  }
  long long dp[100002];
  dp[0] = 1;
  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] %= MOD;
      }
    }
  }
  cout << dp[N] << "\n";
  return 0;
}
