#include <bits/stdc++.h>
using namespace std;
const long long wari = 1000000007;
int N, M;
set<long long> m_set;
long long ans = 0;
void rec(long long cur) {
  if (cur > N) return;
  if (cur == N) {
    ++ans;
    return;
  }
  if (m_set.count(cur) == 1) {
    cout << "break:cur=" << cur << "\n";
    return;
  }
  rec(cur + 1);
  rec(cur + 2);
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    long long tmp = 0;
    cin >> tmp;
    m_set.insert(tmp);
  }
  rec(0);
  cout << "ans=" << (ans % wari) << "\n";
  return 0;
}
