#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1000000007;
vector<long long> dp(100000 + 1);
long long rec(long long i) {
  if (dp[i] == -1)
    return 0;
  else if (dp[i])
    return dp[i];
  else {
    dp[i] = (rec(i - 1) + rec(i - 2)) % MAX;
    return dp[i];
  }
}
void solve() {
  long long n, m;
  cin >> n >> m;
  dp.resize(n + 1);
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 0; i < (m); ++i) {
    int a;
    cin >> a;
    dp[a] = -1;
  }
  cout << rec(n) << endl;
}
int main() {
  solve();
  return 0;
}
