#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dp[100010];
long long unsafe[100010];
long long solve(long long n) {
  if (dp[n]) return dp[n];
  if (unsafe[n]) return 0;
  if (n == 0 or n == 1) return 1;
  return dp[n] = (solve(n - 1) + solve(n - 2)) % mod;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  long long n, m;
  cin >> n >> m;
  for (int i = 0; i < (int)100010; i++) {
    dp[i] = 0;
    unsafe[i] = 0;
  }
  for (int i = 0; i < (int)m; i++) {
    long long itr;
    cin >> itr;
    unsafe[itr] = 1;
  }
  cout << solve(n) << endl;
}
