#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 4;
const int MOD = 1e9 + 7;

struct Mat{
	int val[N][N];
	int n;
	Mat(int a, int b)
	{
		n = a;
		for (int i=0; i<n; i++)
			for (int j=0; j<n; j++)
				val[i][j] = i == j ? b : 0;
	}
	int * operator [](int x)
	{
		return val[x];
	}
};

Mat operator *(Mat a, Mat b)
{
	int n = a.n;
	Mat res(n, 0);
	for (int i=0; i<n; i++)
		for (int j=0; j<n; j++)
			for (int k=0; k<n; k++)
				res[i][k] = (res[i][k] + 1LL * a[i][j] * b[j][k]) % MOD;
	return res;
}

Mat operator ^(Mat a, ll b)
{
	Mat res(a.n, 1);
	while (b)
	{
		if (b & 1)
			res = res * a;
		a = a * a;
		b >>= 1;
	}
	return res;	
}

void print(Mat a)
{
	for (int i=0; i<3; i++)
	{
		for (int j=0; j<3; j++)
			cout << a[i][j] << " ";
		cout << "\n";
	}
	cout << "\n";
}

int x[100 * 1000 + 1];

int main()
{

	Mat a(3, 1);
	a[0][1] += 2; a[0][0] += 1; a[0][2] += 1;
	a[1][0] += 1;
	a[2][1] += 2; a[2][0] += 1;

	Mat b(3, 1);
	b[1][0] += 1;
	b[2][1] += 2; b[2][0] += 1;
	
	int n, m;
	cin >> n >> m;
	Mat res(3, 1);
	res[1][1] = 1;
	for (int i=1; i<=m; i++)
		cin >> x[i];
	x[++m] = n;
	x[0] = 0;
	m++;
	for (int i=0; i+1<m; i++)
	{
		res = (a ^ (x[i+1] - x[i] - 1)) * res;
		res = b * res;
	}
	cout << res[2][0] << "\n";
}