#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long dp[100011], mod = 1000000007;
long long fibo(int i) {
  if (i == 1) return dp[i] = 1;
  if (i == 1) return dp[i] = 1;
  return dp[i] = fibo(i - 1) + fibo(i - 2);
}
int main() {
  int n, m, a[100001];
  cin >> n >> m;
  for (int i = 0; i < m; i++) cin >> a[i];
  long long ans = fibo(a[0]);
  for (int i = 1; i < m - 1; i++) {
    ans += fibo(a[i + 1] - a[i]) % mod;
  }
  cout << ans + fibo(n - a[m - 1]) << endl;
  return 0;
}
