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.*;
import java.util.*;
import java.math.*;

public class Contest178 {

    public static void main(String[] args) throws IOException {
        new Contest178().run();
    }

    class Book {
        public int t;
        public int w;
        public Book(int _t, int _w) {
            t = _t;
            w = _w;
        }
    }

    class Cmp implements Comparator<Book> {
        public int compare(Book b1, Book b2) {
            return b1.w < b2.w ? -1 : (b2.w > b1.w ? 1 : 0);
        }
    }

    BigInteger fact[];

    public void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();
        int en[] = new int[m];
        for(int i = 0; i < m; ++i)
            en[i] = nextInt();
        Arrays.sort(en);
        int left = en[0] - 1;
        int right = n - en[m - 1];
        ArrayList<Integer> inner = new ArrayList<Integer>();

        for(int i = 0; i + 1 < m; ++i)
            if(en[i] + 1 != en[i + 1])
                inner.add(en[i + 1] - en[i] - 1);

        fact = new BigInteger[n + 1];
        fact[0] = BigInteger.ONE;
        for(int i = 1; i < fact.length; ++i)
            fact[i] = fact[i - 1].multiply(BigInteger.valueOf(i));

        BigInteger res = fact[n - m];
        res = res.divide(fact[left]);
        res = res.divide(fact[right]);
        for(int cur : inner)
            res = res.divide(fact[cur]);

        for(int cur : inner)
            res = res.multiply(BigInteger.valueOf(2).pow(cur - 1));

        res = res.mod(BigInteger.valueOf(1000000007));
        out.println(res);
    }

    /*
    public void solve() throws IOException {
        int n = nextInt();
        Book books[] = new Book[n];
        int full_t = 0;
        for(int i = 0; i < n; ++i) {
            int t = nextInt();
            int w = nextInt();
            books[i] = new Book(t, w);
            full_t += t;
        }

        Arrays.sort(books, new Cmp());

        int cur_t = full_t;
        int cur_w = 0;
        int res_t = cur_t;
        int ptr = 0;
        while(true) {
            cur_t -= books[ptr].t;
            cur_w += books[ptr].w;
            ++ptr;
            if(cur_w <= cur_t)
                res_t = Math.min(res_t, cur_t);
            if(cur_w > cur_t || ptr == n)
                break;

        }
        out.println(res_t);
    }
    */

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

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

        return in.nextToken();
    }

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

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

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    void run() throws IOException {
        boolean oj = System.getProperty( "ONLINE_JUDGE" ) != null;
        Reader reader = new InputStreamReader( oj ? System.in : new FileInputStream("input.txt"));
        Writer writer = new OutputStreamWriter( oj ? System.out : new FileOutputStream("output.txt"));
        br = new BufferedReader(reader);
        out = new PrintWriter(writer);

        solve();

        out.close();
    }
}