#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
using Graph = vector<vector<int>>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int n, m;
long long dp[100005];
vector<bool> ch(100005, true);
long long rec(int i) {
  if (i == 0) return 1;
  if (i == 1) return 1;
  if (dp[i] != -1) return dp[i];
  if (ch[i - 1] && ch[i - 2])
    return dp[i] = (rec(i - 1) + rec(i - 2)) % MOD;
  else if (ch[i - 1] && !ch[i - 2])
    return dp[i] = rec(i - 1);
  else if (!ch[i - 1] && ch[i - 2])
    return dp[i] = rec(i - 2);
  return 0;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    ch[a] = false;
  }
  memset(dp, -1, sizeof(dp));
  cout << rec(n) << endl;
  return 0;
}
