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

using namespace std;



const int N = 100000 + 10;

const int Mod = 1e9 + 7;

const int D = 3;



struct Vector {

	int a[D];

	int &operator[]( int i ) { return a[i]; }

	const int &operator[]( int i ) const { return a[i]; }

};

struct Matrix {

	int a[D][D];

	void zero(){

		memset( a, 0, sizeof(a) );

	}

	void unit(){

		memset( a, 0, sizeof(a) );

		for( int i = 0; i < D; i++ ) a[i][i] = 1;

	}

	int * operator[]( int i ) { return a[i]; }

	const int * operator[]( int i ) const { return a[i]; }

};

Matrix operator*( const Matrix &r, const Matrix &s ) {

	Matrix rt;

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

		for( int j = 0; j < D; j++ ) {

			rt[i][j] = 0;

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

				rt[i][j] = int((rt[i][j] + 1LL * r[i][k] * s[k][j]) % Mod);

		}

	return rt;

}

Vector operator*( const Matrix &r, const Vector &s ) {

	Vector rt;

	for( int i = 0; i < D; i++ ) {

		rt[i] = 0;

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

			rt[i] = int((rt[i] + 1LL * r[i][k] * s[k]) % Mod);

	}

	return rt;

}



int n, m;

int sep[N];

long long f[N];



Matrix mpow( Matrix a, int b ) {

	Matrix rt;

	for( rt.unit(); b; b>>=1,a=a*a )

		if( b & 1 ) rt = rt * a;

	return rt;

}



int main() {

	Matrix T1, T2;

	T1.zero(), T2.zero();

	T1[0][0] = T1[0][1] = T1[2][1] = 2;

	T1[0][2] = T1[1][0] = T1[1][1] = T1[2][0] = T1[2][2] = 1;

	T2[0][0] = T2[1][0] = T2[1][1] = T2[2][0] = T2[2][2] = 1;

	T2[2][1] = 2;

	Vector cur;

	cur[0] = 1;

	cur[1] = cur[2] = 0;



	scanf( "%d%d", &n, &m );

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

		scanf( "%d", sep + i );

	}

	int last = 0;

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

		cur = mpow(T1,sep[i] - last - 1) * cur;

		cur = T2 * cur;

		last = sep[i];

	}

	cur = mpow(T1,n - last - 1) * cur;

	int ans = int((0LL + cur[0] + cur[1] * 2 + cur[2]) % Mod);

	printf( "%d\n", ans );

}








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

}