#include <bits/stdc++.h>
using namespace std;
int N, M;
bool cannot[100000] = {};
int dp[100000] = {};
int solve(int now) {
  if (now == N) return 1;
  if (now == N + 1) return 0;
  if (cannot[now]) return 0;
  if (dp[now] != 0) return dp[now];
  return dp[now] = (solve(now + 1) + solve(now + 2)) % 1000000007;
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int tmp;
    cin >> tmp;
    cannot[tmp - 1] = true;
  }
  cout << solve(0) << endl;
}
