#include <bits/stdc++.h>
using namespace std;
long long n, m, cnt = 0;
const long long MOD = 1000000007;
vector<long long> fib(105, -1);
long long fibonacci(long long k) {
  if (fib[k] != -1) {
    return fib[k];
  }
  fib[k] = fibonacci(k - 2) + fibonacci(k - 1);
  return fib[k];
}
signed main() {
  fib[0] = 0;
  fib[1] = 1;
  fib[2] = 1;
  cin >> n >> m;
  long long a, t = 0, sum = 1;
  for (long long i = 0; i < m; ++i) {
    cin >> a;
    sum *= fibonacci(a - t) % MOD;
    sum %= MOD;
    t = a + 1;
  }
  sum *= fibonacci(n + 1 - t) % MOD;
  sum %= MOD;
  cout << sum << endl;
}
