#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long int x, n;
  cin >> x >> n;
  map<long long int, long long int> m;
  for (int i = 0; i < n; i++) {
    long long int k;
    cin >> k;
    m[k] = 1;
  }
  long long int dp[x + 1];
  dp[0] = 1;
  if (m[1])
    dp[1] = 0;
  else
    dp[1] = 0;
  for (int i = 2; i <= x; i++) {
    if (m[i])
      dp[i] = 0;
    else {
      dp[i] = dp[i - 1] + dp[i - 2];
      dp[i] = dp[i] % 1000000007;
      ;
    }
  }
  cout << dp[x];
}
