#include <bits/stdc++.h>
using namespace std;
long long dp[100001];
bool broken[100001];
long long solve(int n) {
  if (broken[n]) return 0;
  if (dp[n] != 0) return dp[n];
  if (n == 0)
    return dp[n] = 1;
  else if (n == 1)
    return dp[n] = 1;
  else
    return dp[n] = (solve(n - 1) + solve(n - 2)) % (int)(1e9 + 7);
}
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    broken[a] = true;
  }
  cout << solve(N) << endl;
  return 0;
}
