#include <bits/stdc++.h>
using namespace std;
const int M = 1000000007;
int main() {
  int n, m;
  cin >> n >> m;
  vector<bool> f(n + 1, false);
  int dp[100010];
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    f[x] = true;
  }
  dp[0] = 1;
  for (int i = 0; i < n + 1; i++) {
    if (f[i] == true) continue;
    dp[i + 1] += dp[i];
    dp[i + 2] += dp[i];
    dp[i + 1] %= M;
    dp[i + 2] %= M;
  }
  cout << dp[n] << endl;
}
