#include <bits/stdc++.h>
using namespace std;
int check_digits(int n, int m) {
  int digits = 0;
  while (n != 0) {
    n /= m;
    digits++;
  }
  return digits;
}
int sum_digits(int n) {
  int sum = 0;
  int N = n;
  while (N) {
    sum += N % 10;
    N /= 10;
  }
  return sum;
}
int gcd(int n, int m) {
  while (n != 0) {
    if (n < m) swap(n, m);
    n = n % m;
  }
  return m;
}
float dis(int x1, int y1, int x2, int y2) {
  return sqrt(pow(abs(x1 - x2), 2) + pow(abs(y1 - y2), 2));
}
bool is_kaibun(string s) {
  string s_r(s.rbegin(), s.rend());
  return (s == s_r);
}
void yes() { cout << "Yes" << endl; }
void no() { cout << "No" << endl; }
int N, M;
vector<long long> memo(1000000, -1);
long long fdp(long long n) {
  if (n == N) {
    return 1;
  }
  if (n == (N - 1)) {
    return 1;
  }
  if (memo[n] != -1) {
    return memo[n];
  }
  memo[n] = (fdp(n + 1) + fdp(n + 2)) % 1000000007;
  return memo[n];
}
int main() {
  cin >> N >> M;
  long long temp;
  for (int i = 0; i < M; i++) {
    cin >> temp;
    memo[temp] = 0;
  }
  cout << fdp(0) << endl;
  ;
  system("pause");
  return 0;
}
