#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int mod = 1e9 + 7;
ll dp[100005];
ll f(int i) {
  if (i < 0) return 0;
  if (dp[i] == -1) return 0;
  if (dp[i] != 0) return dp[i];
  return dp[i] = (f(i - 1) + f(i - 2)) % mod;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < (int)(m); ++i) {
    int a;
    cin >> a;
    dp[a] = -1;
  }
  dp[0] = 1;
  ll ans = f(n);
  cout << ans << endl;
  return 0;
}
