#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long fib_memo[100005];
signed main() {
  long long n, m, a;
  cin >> n;
  cin >> m;
  memset(fib_memo, 1, 100005);
  fib_memo[0] = 0;
  fib_memo[1] = 1;
  fib_memo[2] = 2;
  for (long long i = 0; i < m; i++) {
    cin >> a;
    fib_memo[a] = 0;
  }
  for (long long i = 3; i <= n; i++) {
    if (0 < fib_memo[i]) {
      fib_memo[i] = (fib_memo[i - 1] % mod) + (fib_memo[i - 2] % mod);
    }
  }
  cout << fib_memo[n] << endl;
}
