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
/*
Keep solving problems.
*/

import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000 * 1000 * 1000 + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "YES";
    private static final String no = "NO";

    //
    class Pair implements Comparable<Pair> {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Pair o) {
            if(x != o.x) {
                return Integer.compare(x, o.x);
            }
            else {
                return Integer.compare(y, o.y);
            }
        }

        @Override
        public int hashCode() {
            int res = 13;
            res = 37 * res + x;
            res = 37 * res + y;
            return res;
        }

        @Override
        public boolean equals(Object obj) {
            if(obj == null) {
                return false;
            }
            if(!(obj instanceof Pair)) {
                return false;
            }
            Pair o = (Pair) obj;
            return this.x == o.x && this.y == o.y;
        }
        @Override
        public String toString() {
            return "x: " + x + "; y: " + y;
        }
    }
    int n;
    boolean[] contains;
    void solve() throws IOException {
        n = nextInt();
        int m = nextInt();
        int[] arr = nextIntArr(m);
        contains = new boolean[n];
        for (int v : arr) {
            contains[v - 1] = true;
        }

        long[][] comb = new long[1 + n][1 + n];
        for (int i = 0; i <= n; i++) {
            comb[i][i] = 1;
            comb[i][0] = 1;
        }
        for (int i = 2; i <= n; i++) {
            for (int j = 1; j < i; j++) {
                comb[i][j] = comb[i - 1][j] + comb[i - 1][j - 1];
                comb[i][j] %= MOD;
            }
        }

        long res = 1;
        int start = 0;
        List<Pair> ls = new ArrayList<>();
        while (start < n) {
            if (contains[start]) {
                start++;
            }
            else {
                int end = start;
                while (end < n && !contains[end]) {
                    end++;
                }
                ls.add(new Pair(start, end - 1));
                start = end;
            }
        }

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

        int sum = 0;
        for (int i = 0; i < ls.size(); i++) {
            Pair p = ls.get(i);
            int len = p.y - p.x + 1;
            sum += len;


            if (isValid(p)) {
                res = res * pow[len - 1];
                res %= MOD;
            }
        }

        for (Pair p : ls) {
            int len = p.y - p.x + 1;
            res = res * comb[sum][len];
            res %= MOD;
            sum -= len;
        }

        outln(res);
    }

    boolean isValid(Pair p) {
        int left = p.x - 1;
        int right = p.y + 1;
        if (left >= 0 && right < n) {
            if (contains[left] && contains[right]) {
                return true;
            }
        }

        return false;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }

    int gcd(int a, int b) {
        while(a != 0 && b != 0) {
            int c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }

    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    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());
    }
}

