// Slower C++ solution:
#include<map>

#include<set>

#include<stack>

#include<queue>

#include<cmath>

#include<cstring>

#include<climits>

#include<cstdio>

#include<iostream>

#include<algorithm>

using namespace std;

#define LL long long

//#define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++)

//char buf[(1 << 21) + 1], *p1 = buf, *p2 = buf;

inline int read() {

	bool f=0;int x=0;char c=getchar();

	while(c<'0'||'9'<c){if(c==EOF)exit(0);if(c=='-')f=1;c=getchar();}

	while('0'<=c&&c<='9') x=(x<<3)+(x<<1)+(c^48),c=getchar();

	return !f?x:-x;

}

#define MAXN 100000

#define INF 0x3f3f3f3f

#define Mod (int)(1e9+7)

struct Matrix{

	#define MAXC 4

	int r,c;

	LL m[MAXC+5][MAXC+5];

	void Init(int R,int C){

		r=R,c=C;

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

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

				m[i][j]=0;

		return ;

	}

	friend Matrix operator * (Matrix A,Matrix B){

		Matrix C;C.Init(A.r,B.c);

		for(int i=0;i<A.r;i++)

			for(int j=0;j<B.c;j++)

				for(int k=0;k<A.c;k++)

					C.m[i][j]=(C.m[i][j]+A.m[i][k]*B.m[k][j])%Mod;

		return C;

	}

	void Print(){

		puts("");

		for(int i=0;i<r;i++,puts(""))

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

				printf("%lld ",m[i][j]);

		puts("");

		return ;

	}

};

Matrix Pow(Matrix x,int y){

	Matrix ret;ret.Init(x.r,x.c);

	for(int i=0;i<ret.r;i++)

		ret.m[i][i]=1;

	while(y){

		if(y&1) ret=ret*x;

		x=x*x,y>>=1;

	}

	return ret;

}

Matrix A,B,C;

void Init(){

	A.Init(1,3),A.m[0][0]=1,A.m[0][1]=2,A.m[0][2]=1;

	B.Init(3,3);

	B.m[0][0]=1,B.m[0][1]=2,B.m[0][2]=1,

	B.m[1][0]=0,B.m[1][1]=1,B.m[1][2]=1,

	B.m[2][0]=1,B.m[2][1]=2,B.m[2][2]=2;

	C.Init(3,3);

	C.m[0][0]=1,C.m[0][1]=2,C.m[0][2]=1,

	C.m[1][0]=0,C.m[1][1]=1,C.m[1][2]=1,

	C.m[2][0]=0,C.m[2][1]=0,C.m[2][2]=1;

	return ;

}

int main(){

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

	Init();

	int lst=1;

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

		int x=read();

		A=A*Pow(B,x-lst);

		A=A*C;

		lst=x+1;

	}

	A=A*Pow(B,n-lst);

	printf("%lld\n",A.m[0][2]);

	return 0;

}

//

// Faster C++ solution for the same problem (measured speedup: 5.097557505462195x):
#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])));

}