#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pp;
typedef pair<ll,ll> pll;
void read(int& x){ scanf("%d",&x); }
void read(ll& x){ scanf("%lld",&x); }
template<typename T,typename... Args>
void read(T& a,Args&... b){ read(a); read(b...); }
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define eb emplace_back
#define x first
#define y second

int n, m;

const ll M = ll(1e9)+7;
struct Mat {
	ll a[3][3];
	Mat(){ memset(a, 0, sizeof(a)); }
	Mat operator*(Mat r){
		Mat ret;
		for(int i=0; i<3; ++i){
			for(int j=0; j<3; ++j){
				for(int k=0; k<3; ++k){
					ret.a[i][j] += a[i][k] * r.a[k][j] % M;
					ret.a[i][j] %= M;
				}
			}
		}
		return ret;
	}
};

Mat yes, no, I;

void mat(){
	yes.a[0][0] = 1;                  yes.a[0][2] = 1;
	yes.a[1][0] = 1; yes.a[1][1] = 1; yes.a[1][2] = 1;
	yes.a[2][0] = 1; yes.a[2][1] = 2; yes.a[2][2] = 2;
	
	no.a[0][0] = 1;
	no.a[1][0] = 1; no.a[1][1] = 1;
	no.a[2][0] = 1; no.a[2][1] = 2; no.a[2][2] = 1;
	
	for(int i=0; i<3; ++i) I.a[i][i]=1;
}

Mat Pow(Mat base, int e){
	if(e == 0) return I;
	Mat ret = Pow(base, e/2);
	ret = ret*ret;
	if(e&1) ret = ret*base;
	return ret;
}

int main()
{
	read(n, m);
	mat();
	int lp=0;
	Mat x = I;
	for(int i=1; i<=m; ++i){
		int p; read(p);
		x = no * x;
		x = Pow(yes, p-lp-1) * x;
		lp = p;
	}
	x = no * x;
	x = Pow(yes, n-lp-1) * x;
	printf("%lld\n", x.a[2][0]);
	return 0;
}
