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.IOException;
import java.util.ArrayList;
import java.util.InputMismatchException;

public class ShaassAndLights {
	public static final int MOD = 1000000007;
	public static final long[] POW2 = new long[1001];
	public static final long[][] COMBOS = computeCombinations(2001);
	static {
		POW2[0] = 1;
		for (int i = 1; i < POW2.length; i++) {
			POW2[i] = (2 * POW2[i - 1]) % MOD;
		}
	}
	
    public static void main(String[] args) {
        FasterScanner sc = new FasterScanner();
        
        int N = sc.nextInt();
        int M = sc.nextInt();
        
        boolean[] on = new boolean[N + 1];
        for (int i = 0; i < M; i++) {
        	int A = sc.nextInt();
        	on[A] = true;
        }
        
        ArrayList<Integer> lst = new ArrayList<Integer>();
        ArrayList<Long> way = new ArrayList<Long>();
        int sofar = 0;
        for (int i = 1; i <= N + 1; i++) {
        	if (i > N || on[i]) {
        		if (sofar > 0) {
        			lst.add(sofar);
        			way.add(POW2[sofar - 1]);
        		}
        		sofar = 0;
        	} else {
        		sofar++;
        	}
        }
        
        if (lst.size() == 0) {
        	System.out.println(1);
        	return;
        }
        
        if (!on[1]) {
        	way.set(0, 1L);
        }
        if (!on[N]) {
        	way.set(way.size() - 1, 1L);
        }

        long cnt = way.get(0);
        int sum = lst.get(0);
        for (int i = 1; i < way.size(); i++) {
        	int len = lst.get(i);
        	long mult = (COMBOS[sum + len][sum] * way.get(i)) % MOD;
        	cnt = (cnt * mult) % MOD;
        	sum += len;
        }
        System.out.println(cnt);
    }
    
    /**
     * Computes all the combinations (i.e. Pascal's triangle) for the given levels.
     * For example, combos[n][k] = (n choose k).
     */
    public static long[][] computeCombinations(int n) {
    	long[][] combos = new long[n + 1][n + 1];
    	combos[0][0] = 1;
    	for (int r = 1; r <= n; r++) {
    		combos[r][0] = 1;
    		for (int c = 1; c <= r; c++) {
    			combos[r][c] = (combos[r - 1][c - 1] + combos[r - 1][c]) % MOD;
    		}
    	}
    	return combos;
    }
    
	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
	        
	    public int[] nextIntArray(int n) {
	        int[] arr = new int[n];
	        for (int i = 0; i < n; i++) {
	            arr[i] = nextInt();
	        }
	        return arr;
	    }
        
		public long[] nextLongArray(int n) {
		    long[] arr = new long[n];
		    for (int i = 0; i < n; i++) {
		        arr[i] = nextLong();
		    }
		    return arr;
		}

	    private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
}