#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long dp[N];
bool cant[N];
long long n;
long long calc(long long i) {
  if (i == n) {
    return 1;
  }
  if (cant[i]) return 0;
  if (dp[i] != -1) {
    return dp[i];
  }
  return dp[i] = (calc(i + 1) % 1000000007) +
                 (calc(i + 2) % 1000000007) % 1000000007;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long m;
  cin >> n >> m;
  memset(dp, -1, sizeof(dp));
  for (long long i = 0; i < m; i++) {
    long long a;
    cin >> a;
    cant[a] = 1;
  }
  cout << calc(0);
  return 0;
}
