#include <bits/stdc++.h>
#pragma GCC optimize "03"
using namespace std;
const long long int N = 1e5 + 5;
const long long int mod = 1e9 + 7;
const long long int inf = 1e9 + 9;
long long int dp[N];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  for (long long int i = 1; i <= m; i++) {
    long long int p;
    cin >> p;
    dp[p] = -1;
  }
  dp[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    if (dp[i] == -1) continue;
    if (i >= 1) dp[i] += dp[i - 1];
    if (i >= 2) dp[i] += dp[i - 2];
    dp[i] %= mod;
  }
  cout << dp[n];
  return 0;
}
