#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int m;
  cin >> n;
  cin >> m;
  int broken[m];
  for (int a = 0; a < m; ++a) {
    cin >> broken[a];
  }
  int dp[n + 1];
  dp[0] = 1;
  int c;
  if (broken[0] == 1) {
    dp[1] = 0;
    c = 1;
  } else {
    c = 0;
    dp[1] = 1;
  }
  for (int b = 2; b <= n; ++b) {
    if (b == broken[c]) {
      dp[b] = 0;
      c++;
    } else
      dp[b] = dp[b - 1] + dp[b - 2];
  }
  cout << dp[n] % 1000000007;
  return 0;
}
