#include <bits/stdc++.h>
using namespace std;
long long fibo(int n, vector<long long> A, vector<long long> &memo) {
  if (n == 1)
    return 1;
  else if (n == 2)
    return 2;
  if (memo.at(n) != -1) return memo.at(n);
  for (int i = 0; i < A.size(); i++) {
    if (n == A.at(i)) {
      return memo.at(n) = 0;
      break;
    } else {
      return memo.at(n) = fibo(n - 1, A, memo) + fibo(n - 2, A, memo);
      break;
    }
  }
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<long long> A(M);
  for (int i = 0; i < M; i++) {
    cin >> A.at(i);
  }
  vector<long long> memo(100000, -1);
  cout << fibo(N, A, memo) % 1000000007 << endl;
}
