#include <bits/stdc++.h>
using namespace std;
long long fib[101] = {0};
long long test(int n) {
  fib[0] = 1;
  fib[1] = 1;
  if (fib[n])
    return fib[n];
  else {
    fib[n] = test(n - 1) + test(n - 2);
    return fib[n];
  }
}
int main() {
  long long int now = 0, step = 0, ans = 1;
  int x;
  x = 1000000007;
  long long a;
  for (int i = 0; i < 101; i++) a = test(i);
  int n, m;
  cin >> n >> m;
  if (m == 0)
    cout << fib[n] << endl;
  else {
    int broken[m];
    for (int i = 0; i < m; i++) cin >> broken[i];
    int j = 0;
    while (now < n) {
      if (now + 1 != broken[j]) {
        now++;
        ++step;
      } else {
        if (now + 2 == broken[min(j + 1, m - 1)]) {
          ans = 0;
          break;
        } else {
          ans *= fib[step];
          ans %= x;
          j++;
          now += 2;
          step = 0;
        }
      }
    }
  }
  ans *= fib[step];
  ans %= x;
  if (m) cout << ans << endl;
  return 0;
}
