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