#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  bool ng[100005] = {};
  long long int dp[100005] = {};
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> k;
    ng[k] = true;
  }
  for (int i = 0; i <= n; i++) {
    if (ng[i] == true)
      dp[i] = 0;
    else if (i == 0 || i == 1)
      dp[i] = 1;
    else
      dp[i] = dp[i - 2] + dp[i - 1];
  }
  long long int ans = dp[n] % 1000000007;
  cout << ans << endl;
}
