#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N, M;
  cin >> N >> M;
  vector<long long int> a(M);
  for (long long int i = 0; i < M; i++) cin >> a[i];
  vector<long long int> dp(N + 1, 0);
  dp[0] = 0;
  long long int j = 0;
  for (long long int i = 1; i <= N; i++) {
    if (i <= 2)
      dp[i] = dp[i - 1] + 1;
    else {
      dp[i] = dp[i - 1] % 1000000007 + dp[i - 2] % 1000000007;
      dp[i] %= 1000000007;
    }
    if (i == a[j]) {
      dp[i] = 0;
      j++;
    }
  }
  cout << dp[N] << endl;
  return 0;
}
