#include <bits/stdc++.h>
using namespace std;
int Fibo(int n) {
  if (n == 0 || n == 1) {
    return 1;
  }
  return Fibo(n - 1) + Fibo(n - 2);
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a;
  for (int i = 0; i < M; i++) {
    int aa;
    cin >> aa;
    a.push_back(aa);
  }
  int all;
  for (int j = 0; j < (N - 2); j++) {
    all += Fibo(j);
  }
  int ans = all - (M * 2) - 1;
  if (a[0] == 1) ans++;
  if (a[M] == N - 1) ans++;
  int out = ans % 1000000007;
  cout << out << endl;
}
