#include <bits/stdc++.h>
using namespace std;
int INF = 1e9;
int ANS = 0;
int N, M;
vector<int> a(1000000000);
int ans(int res) {
  for (int i = 0; i < M; i++) {
    if (a[i] == res)
      return 0;
    else {
      ans(res + 1);
      ans(res + 2);
    }
  }
  if (res == N) {
    ANS++;
  }
  return ANS;
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    cin >> a[i];
  }
  cout << (ans(0)) % 1000000007 << endl;
  ;
  return 0;
}
