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