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

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

 

using namespace std;

using namespace __gnu_pbds;

 

#define fi first

#define se second

#define mp make_pair

#define pb push_back

#define fbo find_by_order

#define ook order_of_key

 

typedef long long ll;

typedef pair<int,int> ii;

typedef vector<int> vi;

typedef long double ld; 

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

typedef set<int>::iterator sit;

typedef map<int,int>::iterator mit;

typedef vector<int>::iterator vit;



const int MOD=1e9+7;

const int DIM = 4;



struct Matrix {

  int a[DIM][DIM];

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



  Matrix(int x = 0) {

    memset(a, 0, sizeof a);

    if (x)

    {

		for(int i = 0; i < DIM; i++) a[i][i] = x;

	}

  }

} const I(1);



Matrix operator * (Matrix A, Matrix B) {

  const ll mod2 = ll(MOD) * MOD;

  Matrix C;

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

 {

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

	 {

		ll w = 0;

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

		{

			w += ll(A[i][k]) * B[k][j];

			if (w >= mod2) w -= mod2;

		}

	C[i][j] = w % MOD;

	}

  }

  return C;

}



Matrix operator ^ (Matrix A, ll b) {

  Matrix R = I;

  for (; b > 0; b /= 2) {

    if (b % 2) R = R*A;

    A = A*A;

  }

  return R;

}



void add(ll &a, ll b)

{

	a+=b;

	while(a>=MOD) a-=MOD;

}



ll mult(ll a, ll b)

{

	return (a*b)%MOD;

}



Matrix M1,M2;



vector<ll> mult(Matrix &a, vector<ll> cur)

{

	vector<ll> V(4,0);

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

	{

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

		{

			add(V[i], mult(a[i][j],cur[j]));

		}

	}

	return V;

}



int main()

{

	ios_base::sync_with_stdio(0); cin.tie(0);

	ll n,k;

	cin>>n>>k;

	vi vec;

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

	{

		ll x; cin>>x; vec.pb(x);

	}

	vec.pb(n);

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

	{

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

		{

			if((j&i)==j)

			{

				M1[i][j]=M2[i][j]=1;

			}

		}

		M1[i][3]++;

	}

	vector<ll> V = {1,1,1,1};

	int cur = 1;

	for(int i = 0; i < vec.size(); i++)

	{

		int ext = vec[i] - cur;

		Matrix M = M1^ext;

		V = mult(M, V);

		cur = vec[i];

		if(cur==n) break;

		cur++;

		V = mult(M2,V);

	}

	cout<<V[3]<<'\n';

}


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

}