#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M, i, j, sub, root, sn, fn, fib;
  cin >> N >> M;
  int a[M];
  for (i = 0; i < M; i++) cin >> a[i];
  if (M > 1) {
    for (i = 1; i < M; i++) {
      sub = a[i] - a[i - 1];
      if (sub = 1) {
        cout << "0"
             << "error";
        exit(0);
      }
    }
  }
  root = 0;
  sn = 0;
  for (i = 0; i < M; i++) {
    fn = a[i] - 1;
    fib = fn - sn;
    int dp[1000] = {0};
    dp[0] = 1;
    dp[1] = 2;
    for (j = 2; j < fib; j++) {
      dp[j] = dp[j - 1] + dp[j - 2];
    }
    root += dp[fib - 1];
    sn = a[i] + 1;
  }
  fib = N - sn;
  int dp[1000] = {0};
  dp[0] = 1;
  dp[1] = 2;
  for (j = 2; j < fib; j++) {
    dp[j] = dp[j - 1] + dp[j - 2];
  }
  root += dp[fib - 1];
  root %= 1000000007;
  cout << root;
  return 0;
}
