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
// Main Code at the Bottom
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger; 
public class Main{
	//Fast IO class
    static class FastReader {
        BufferedReader br; 
        StringTokenizer st; 
        public FastReader() {
        	boolean env=System.getProperty("ONLINE_JUDGE") != null;
        	if(!env) {
        		try {
					br=new BufferedReader(new FileReader("src\\input.txt"));
				} catch (FileNotFoundException e) {
					e.printStackTrace();
				}
        	}
        	else br = new BufferedReader(new InputStreamReader(System.in)); 
        } 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) {
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
        int nextInt() {
            return Integer.parseInt(next()); 
        } 
        long nextLong() {
            return Long.parseLong(next()); 
        } 
        double nextDouble() {
            return Double.parseDouble(next()); 
        } 
        String nextLine() {
            String str = ""; 
            try {
                str = br.readLine(); 
            } 
            catch (IOException e) {
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }     
    static long MOD=1000000000+7;
    //debug
    static void debug(Object... o) {
        System.out.println(Arrays.deepToString(o));
    }
    // Pair
    static class pair{
    	long x,y;
    	pair(long a,long b){
    		this.x=a;
    		this.y=b;
    	}
    	public boolean equals(Object obj) {
    		if(obj == null || obj.getClass()!= this.getClass()) return false;
            pair p = (pair) obj;
            return (this.x==p.x && this.y==p.y);
        }
    	public int hashCode() {
            return Objects.hash(x,y);
        }
    }
    static FastReader sc=new FastReader();
    static PrintWriter out=new PrintWriter(System.out);  
    //Global variables and functions
    static long exp(long x,long n) {
    	if(n==0) return 1;
    	if(n%2==0) return exp((x*x)%MOD,n/2)%MOD;
    	else return ((x%MOD)*exp((x*x)%MOD,n/2))%MOD;
    }
    static long inv(long x) {
    	return exp(x,MOD-2);
    }
    static int N=2000+10;
    static long fact[]=new long[N];
    //Main function(The main code starts from here)
    public static void main (String[] args) throws java.lang.Exception {
    	int test=1;
    	//test=sc.nextInt();
    	while(test-->0){
    		int n=sc.nextInt(),m=sc.nextInt(),a[]=new int[m];
    		for(int i=0;i<m;i++) a[i]=sc.nextInt();
    		Arrays.parallelSort(a);
    		fact[0]=1;
    		for(int i=1;i<N;i++) fact[i]=(fact[i-1]*i)%MOD;
    		int prev=-1;
    		long ans=1,num=0,denom=1;
    		for(int i=0;i<m;i++) {
    			long val=1;
    			int len=(prev==-1?a[i]-1:a[i]-prev-1);
    			if(prev!=-1 && len>0) val=exp(2,len-1);
    			ans=(ans*val)%MOD;
    			num+=len;
    			denom=(denom*fact[(int)len])%MOD;
    			prev=a[i];
    		}
    		num+=n-prev;
    		denom=(denom*fact[n-prev])%MOD;
    		long val=(fact[(int)num]*inv(denom))%MOD;
    		ans=(ans*val)%MOD;
    		out.println(ans);
    	}	
        out.flush();
        out.close();
    }
}