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