There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be switched off at that moment) if there's at least one adjacent light which is already switched on. 

He knows the initial state of lights and he's wondering how many different ways there exist to switch all the lights on. Please find the required number of ways modulo 1000000007 (109 + 7).

Input

The first line of the input contains two integers n and m where n is the number of lights in the sequence and m is the number of lights which are initially switched on, (1 ≤ n ≤ 1000, 1 ≤ m ≤ n). The second line contains m distinct integers, each between 1 to n inclusive, denoting the indices of lights which are initially switched on.

Output

In the only line of the output print the number of different possible ways to switch on all the lights modulo 1000000007 (109 + 7).

Examples

Input

3 1
1


Output

1


Input

4 2
1 4


Output

2


Input

11 2
4 8


Output

6720
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;



public class ShaassAndLights
{
	static long[][] comb;
	static long [] power;
	static long [] fact = new long[1000];
	final static int MOD = (int) 1e9 + 7;

	static void power(int n)
	{
		power = new long[n];
		power[0] = 1;
		for (int i = 1; i < n; i++)
		{
			power[i] = (2 * power[i-1])%MOD;
		}
	}

	static void nCr2(int N)		// O(N * N)
	{
		comb = new long[N][N];
		comb[0][0] = 1;
		for (int i = 1; i < N; i++)
		{
			comb[i][0] = 1;
			for (int j = 1; j <= i; j++)
				comb[i][j] = (comb[i-1][j] + comb[i-1][j-1]) % MOD;		
		}
	}
	public static void main(String[] args) throws IOException
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int [] a = new int[n+1];
		power(n);
		nCr2(n);
		for (int i = 0; i < m; i++)
		{
			int on = sc.nextInt();
			a[on] = 1;
		}
		int regions = 0, begin = 1, end = 1;
		int [] regionsSize = new int [n-m];
		for (int i = 1; i < n; i++)
		{
			if(a[i] == 1 && a[i+1] == 0)
				begin = i+1;
			if(a[i] == 0 && a[i+1] == 1)
			{
				end = i;
				regionsSize[regions++] = end - begin + 1;
			}
		}
		if(a[n] == 0)
		{
			regionsSize[regions++] = n - begin + 1;
		}
		long result = 1;
		if(regions > 0)
		{
			int sum = regionsSize[0];
			
			for (int i = 1; i < regions; i++)
			{
				result = (result * comb[(sum + regionsSize[i])][regionsSize[i]]) % MOD;
				sum += regionsSize[i];
				if(i != regions-1)
					result = (result * power[regionsSize[i]-1]) % MOD;
			}
		}
		if((a[1] == 1 && regions > 1) || (regions == 1 && a[n] == 1))
			result = (result * power[regionsSize[0]-1]) % MOD;
		if(a[n] == 1 && regions > 1)
			result = (result * power[regionsSize[regions-1]-1]) % MOD;

		System.out.println(result);
	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}


	}
}
