#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long dp[100100];
bool hantei[100100];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    long long a;
    cin >> a;
    hantei[a] = 1;
  }
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (hantei[i - 2] == 0) dp[i] += dp[i - 2];
    if (hantei[i - 1] == 0) dp[i] += dp[i - 1];
  }
  cout << dp[n] % MOD << endl;
  return 0;
}
