#include <bits/stdc++.h>
using namespace std;
vector<int> aa;
map<int, int> st;
int N, M;
int dfs(int now) {
  if (now > N) {
    return 0;
  } else if (now == N) {
    return 1;
  }
  if (st.count(now)) return st.at(now);
  for (int a : aa) {
    if (now == a) {
      if (!st.count(now)) {
        st[now] = 0;
      }
      return 0;
    }
  }
  int cnt = 0;
  for (int i = 0; i < (int)(2); i++) {
    cnt += dfs(now + i + 1) % 1000000007;
  }
  if (!st.count(now)) {
    st[now] = cnt;
  }
  return cnt;
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < (int)(M); i++) {
    int ipt;
    cin >> ipt;
    aa.push_back(ipt);
  }
  int ans = dfs(0);
  cout << ans << endl;
}
