// Slower C++ solution:
#include<bits/stdc++.h>

#define rep(i,a,b) for (register int i=(a); i<=(b); ++i)

#define per(i,a,b) for (register int i=(a); i>=(b); --i)

using namespace std;

 

inline char getch() {

	static char buf[300000], *p1 = buf, *p2 = buf;

	return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 300000, stdin), p1 == p2) ? EOF : *p1++;

}

inline int read() {

	char ch = getch(); int x = 0;

	while (!isdigit(ch)) ch = getch();

	while (isdigit(ch)) { x = (x<<3) + (x<<1) + ch - '0'; ch = getch(); }

	return x;

}

 

const int maxm = 100005, MOD = 1000000007;

int p[30][3][3], q[3][3], t[3][3], A[3][3];

int x, last = -1, n, m;

 

inline void mul33(int a[3][3], int b[3][3], int c[3][3]) {

	t[0][0] = (1LL * a[0][0] * b[0][0] + 1LL * a[0][1] * b[1][0] + 1LL * a[0][2] * b[2][0]) % MOD;

	t[0][1] = (1LL * a[0][0] * b[0][1] + 1LL * a[0][1] * b[1][1] + 1LL * a[0][2] * b[2][1]) % MOD;

	t[0][2] = (1LL * a[0][0] * b[0][2] + 1LL * a[0][1] * b[1][2] + 1LL * a[0][2] * b[2][2]) % MOD;

	t[1][0] = (1LL * a[1][0] * b[0][0] + 1LL * a[1][1] * b[1][0] + 1LL * a[1][2] * b[2][0]) % MOD;

	t[1][1] = (1LL * a[1][0] * b[0][1] + 1LL * a[1][1] * b[1][1] + 1LL * a[1][2] * b[2][1]) % MOD;

	t[1][2] = (1LL * a[1][0] * b[0][2] + 1LL * a[1][1] * b[1][2] + 1LL * a[1][2] * b[2][2]) % MOD;

	t[2][0] = (1LL * a[2][0] * b[0][0] + 1LL * a[2][1] * b[1][0] + 1LL * a[2][2] * b[2][0]) % MOD;

	t[2][1] = (1LL * a[2][0] * b[0][1] + 1LL * a[2][1] * b[1][1] + 1LL * a[2][2] * b[2][1]) % MOD;

	t[2][2] = (1LL * a[2][0] * b[0][2] + 1LL * a[2][1] * b[1][2] + 1LL * a[2][2] * b[2][2]) % MOD;

	c[0][0] = t[0][0]; c[0][1] = t[0][1]; c[0][2] = t[0][2];

	c[1][0] = t[1][0]; c[1][1] = t[1][1]; c[1][2] = t[1][2];

	c[2][0] = t[2][0]; c[2][1] = t[2][1]; c[2][2] = t[2][2];

}

 

inline void mul31(int a[3][3], int b[3][3], int c[3][3]) {

	t[0][0] = (1LL * a[0][0] * b[0][0] + 1LL * a[0][1] * b[1][0] + 1LL * a[0][2] * b[2][0]) % MOD;

	t[1][0] = (1LL * a[1][0] * b[0][0] + 1LL * a[1][1] * b[1][0] + 1LL * a[1][2] * b[2][0]) % MOD;

	t[2][0] = (1LL * a[2][0] * b[0][0] + 1LL * a[2][1] * b[1][0] + 1LL * a[2][2] * b[2][0]) % MOD;

	c[0][0] = t[0][0]; c[1][0] = t[1][0]; c[2][0] = t[2][0];

}

 

inline void mulPower(int k, int a[3][3]) {

	per (i, 29, 0) if (k>>i&1) mul31(p[i], a, a);

}

 

 

int main() {

	p[0][0][0] = 1; p[0][0][1] = 0; p[0][0][2] = 1;

	p[0][1][0] = 2; p[0][1][1] = 1; p[0][1][2] = 2;

	p[0][2][0] = 1; p[0][2][1] = 1; p[0][2][2] = 2;

	q[0][0] = 1; q[0][1] = 0; q[0][2] = 0;

	q[1][0] = 2; q[1][1] = 1; q[1][2] = 0;

	q[2][0] = 1; q[2][1] = 1; q[2][2] = 1;

	rep (i, 1, 29) mul33(p[i-1], p[i-1], p[i]);

	A[0][0] = 1; n = read(); m = read();

	while (m--) {

		x = read();

		mulPower(x-last-1, A);

		mul31(q, A, A);

		last = x;

	}

	mulPower(n-last-1, A);

	printf("%d\n", A[2][0]);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.0590948643320734x):
#include<cstdio>

#include<algorithm>

#include<cmath>

#include<cstring>

#include<stack>

#include<vector>

#include<queue>

#include<bitset>

#include<map>

using namespace std;



#define LL long long

#define DB double

#define MOD 1000000007

#define Pr pair<DB,int>

#define X first

#define Y second

#define mem(x,p) memset(x,p,sizeof(x))



LL read(){

  LL x=0,F=1;char c=getchar();

  while(c<'0'||c>'9'){if(c=='-')F=-1;c=getchar();}

  while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}

  return x*F;

}



int add(int a,int b){return (a+b>=MOD)?a+b-MOD:a+b;}

int dec(int a,int b){return (a-b<0)?a-b+MOD:a-b;}

int mul(int a,int b){return 1LL*a*b%MOD;}

LL pabs(int x){

    return (x<0)?-x:x;

}



int T;

int n,m,pre;



struct Matrix{

    int ma[3][3];

    Matrix(){mem(ma,0);}

};



void init(Matrix &K)

{

	K.ma[0][0]=1;//c->c

    K.ma[1][0]=1;K.ma[1][1]=1;//b(x+1)->bx+b

    K.ma[2][0]=1;K.ma[2][1]=2;K.ma[2][2]=1;//cx^2->cx^2+2cx+c

}



Matrix mul(Matrix A,Matrix B)

{

	Matrix C;

    for(int k=0;k<3;k++)

	   for(int i=0;i<3;i++)

            for(int j=0;j<3;j++)

            C.ma[i][j]=add(C.ma[i][j],mul(A.ma[i][k],B.ma[k][j]));

	return C;

}



Matrix fs_pow(Matrix A,LL k)

{

	Matrix B;

	for(int i=0;i<3;i++)

    B.ma[i][i]=1;

	while(k) {

        if(k&1) B=mul(B,A);

        A=mul(A,A);

        k>>=1;

    }

    return B;

}



int main()

{

    pre=1;

    n=read(),m=read();

    Matrix A,B,Fc;

	init(A);B=A;

    B.ma[0][2]++,B.ma[1][2]++,B.ma[2][2]++;

	Fc.ma[0][2]=1;

    for(int i=1;i<=m;i++){

        int x=read();

        Fc=mul(Fc,fs_pow(B,x-pre));

        Fc=mul(Fc,A);

        pre=x+1;

    }

    Fc=mul(Fc,fs_pow(B,n-pre));

    printf("%d\n",add(Fc.ma[0][0],add(Fc.ma[0][1],Fc.ma[0][2])));

}