#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int INF = 1 << 20;
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int x[m];
  for (int i = 0; i < m; i++) {
    cin >> x[i];
  }
  long long fib[100005];
  fib[0] = 0;
  fib[1] = 1;
  for (int i = 2; i < 100005; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
    fib[i] %= mod;
  }
  long long ans = fib[x[0]];
  for (int i = 1; i < m; i++) {
    ans %= mod;
    ans *= fib[x[i] - x[i - 1] - 1];
    ans %= mod;
  }
  ans *= fib[n - x[m - 1]];
  ans %= mod;
  cout << ans;
}
