#include <bits/stdc++.h>
using namespace std;
int dp[(int)1e5];
map<int, int> b;
int sol(int n) {
  if (n == 0) return 1;
  if (n < 0) return 0;
  if (dp[n] != -1) return dp[n];
  int nw = 0;
  if (!b[n - 1]) nw = (sol(n - 1) + nw) % 1000000007;
  if (!b[n - 2]) nw = (sol(n - 2) + nw) % 1000000007;
  dp[n] = nw % 1000000007;
  return dp[n];
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < int(m); i++) {
    int a;
    cin >> a;
    b[a] = 1;
  }
  memset(dp, -1, sizeof(dp));
  int ans = sol(n) % 1000000007;
  cout << ans << endl;
  return 0;
}
