#include <bits/stdc++.h>
using namespace std;
long long int dp[100005];
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<long long int> dan(n + 2, 1);
  for (int i = 0; i < (m); ++i) {
    int x;
    cin >> x;
    dan[x] = 0;
  }
  long long int ans = 0;
  dp[0] = 0;
  if (dan[1]) {
    dp[1] = 1;
  } else {
    dp[1] = 0;
  }
  if (dan[2] && dan[1]) {
    dp[2] = 2;
  }
  if (dan[2] && !dan[1]) {
    dp[2] = 1;
  }
  if (!dan[2]) {
    dp[2] = 0;
  }
  for (int i = 1; i < n; i++) {
    if (dan[i + 2]) {
      dp[i + 2] = dp[i + 1] + dp[i];
    }
  }
  ans = dp[n] % 1000000007;
  cout << ans << endl;
  return 0;
}
