#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> a(m);
  for (long long i = 0; i < m; i++) {
    cin >> a[i];
  }
  long long p = a[0];
  for (long long x : a) {
    if (x - p == 1) {
      cout << 0 << endl;
      return 0;
    }
    p = x;
  }
  vector<int> f(n + 1);
  f[1] = 1;
  f[2] = 2;
  long long t = 0;
  for (long long x : a) {
    if (x == 1) {
      f[1] = 0;
      m--;
      t = 3;
    }
    if (n - m == 1) {
      m--;
      t = 3;
    }
  }
  for (long long i = 3; i < n; i++) {
    f[i] = f[i - 1] + f[i - 2];
  }
  long long ans;
  ans = f[n - 1] - (m * 4) - t;
  cout << ans % 1000000007 << endl;
  return 0;
}
