#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const double PI = 3.14159265358979323846;
const long long mod = 1e9 + 7;
const int MAX = 1e5 + 1;
int f(int k, int n, int m, vector<int> a) {
  if (k == n) return 1;
  for (int i = 0; i < m; i++) {
    if (k == a[i]) return 0;
  }
  return (f(k + 1, n, m, a) % mod + f(k + 2, n, m, a) % mod) % mod;
}
int main(int argc, char *args[]) {
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  int ans = f(0, n, m, a);
  cout << ans << endl;
  return 0;
}
