#include <bits/stdc++.h>
using namespace std;
const int maxN = 100000;
int N, M;
bool isBroken[maxN + 1];
int dp[maxN + 1];
int rec(int dan) {
  if (dan == N) {
    return 1;
  }
  if (dan > N) return 0;
  int res = 0;
  if (!isBroken[dan + 1]) {
    int c;
    if (dp[dan + 1] != -1) {
      c = dp[dan + 1];
    } else {
      c = rec(dan + 1);
      dp[dan + 1] = c;
    }
    res += c % 1000000007;
  }
  if (!isBroken[dan + 2]) {
    int c;
    if (dp[dan + 2] != -1) {
      c = dp[dan + 2];
    } else {
      c = rec(dan + 2);
      dp[dan + 2] = c;
    }
    res += c % 1000000007;
  }
  return res;
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < N + 1; ++i) {
    isBroken[i] = false;
    dp[i] = -1;
  }
  for (int i = 0; i < M; ++i) {
    int a;
    cin >> a;
    isBroken[a] = true;
  }
  cout << rec(0) << endl;
  return 0;
}
