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

public class Main {
    public static long time = 0;

    public static void main(String[] args) throws Exception {
        time = System.currentTimeMillis();
        solve();
        out.flush();
    }

    static long mod = Long.parseLong("1000000007");
    static long[] factorials = new long[1000+50];
    public static void solve() throws Exception {
        int qqq = 1000;
        for (int i = 0; i < qqq + 10; i++) {
            pascal[i][0] = 1;
        }
        for (int i = 1; i < qqq + 10; i++) {
            for (int j = 1; j < qqq + 10; j++) {
                pascal[i][j] = pascal[i - 1][j - 1] + pascal[i - 1][j];
                pascal[i][j] %= mod;
            }
        }

        int len = ni();
        int n1 = ni();
        IntL l1 = new IntL();
        l1.add(0);
        for (int e : nil(n1))
            l1.add(e);
        l1.add(len + 1);
        l1.sort();
        IntL segs = new IntL();
        for (int i = 0; i < l1.size - 1; i++) {
            segs.add(l1.get(i + 1) - l1.get(i) - 1);
        }
        long curno = 1;
        long curlen = 0;
//      px(segs);
//      px(mod);
        for (int i = 0; i < segs.size; i++) {
            int curseg = segs.get(i);
            long thisno = 1;
            if (i == 0) {
                thisno = 1;
                
            } else if (i == segs.size - 1) {
                thisno = 1;
                
            } else {
                if (curseg == 0) thisno = 1;
                else 
                thisno = MODX.pow(2, curseg - 1, mod);
            }
            curno = MODX.t(curno, thisno, mod);
            long mergeno = merge(curlen, curseg);
            curno = MODX.t(curno, mergeno, mod);
            curlen += curseg;
//          px(curno);
        }
        pn(curno);
    }

    public static long[][] pascal = new long[1000 + 50][1000 + 50];

    public static long merge(long n1, long n2) {
        return pascal[(int) (n1 + n2)][(int) (n1)];
    }

    public static BufferedReader in = new BufferedReader(new InputStreamReader(
            System.in));
    public static StringTokenizer st = null;

    public static String nx() throws Exception {
        for (; st == null || !st.hasMoreTokens();) {
            String k1 = in.readLine();
            if (k1 == null)
                return null;
            st = new StringTokenizer(k1);
        }
        return st.nextToken();
    }

    public static int ni() throws Exception {
        return Integer.parseInt(nx());
    }

    public static long nl() throws Exception {
        return Long.parseLong(nx());
    }

    public static double nd() throws Exception {
        return Double.parseDouble(nx());
    }

    private static int[] nil(int n1) throws Exception {
        int[] l1 = new int[n1];
        for (int i = 0; i < n1; i++) {
            l1[i] = ni();
        }
        return l1;
    }

    public static void px(Object... l1) {
        System.out.println(Arrays.deepToString(l1));
    }

    public static boolean FLUSH = false;
    public static PrintWriter out = new PrintWriter(System.out, FLUSH);

    public static void p(Object... l1) {
        for (int i = 0; i < l1.length; i++) {
            if (i != 0)
                out.print(' ');
            out.print(l1[i].toString());
        }
    }

    public static void pn(Object... l1) {
        for (int i = 0; i < l1.length; i++) {
            if (i != 0)
                out.print(' ');
            out.print(l1[i].toString());
        }
        out.println();
    }

    public static void pn(Collection l1) {
        boolean first = true;
        for (Object e : l1) {
            if (first)
                first = false;
            else
                out.print(' ');
            out.print(e.toString());
        }
        out.println();
    }

    private static class IntL implements Iterable<Integer> {
        public int[] cont = null;
        public int size = 0;

        public IntL(int initialCapacity) {
            this.cont = new int[initialCapacity];
        }

        public IntL() {
            this(5);
        }

        public void add(int e) {
            if (size == cont.length) {
                cont = Arrays.copyOf(cont, ((cont.length * 3) >> 1) + 1);
            }
            cont[size++] = e;
        }

        public int get(int id) {
            if (id >= 0)
                return cont[id];
            else
                return cont[size + id];
        }

        public void sort() {
            Shuffle.ints(cont, 0, size);
            Arrays.sort(cont, 0, size);
        }

        @Override
        public String toString() {
            StringBuilder fin = new StringBuilder();
            fin.append('{');
            for (int i = 0; i < size; i++) {
                if (i != 0)
                    fin.append(", ");
                fin.append(cont[i]);
            }
            fin.append('}');
            return fin.toString();
        }

        @Override
        public Iterator<Integer> iterator() {
            return new It();
        }

        public class It implements Iterator<Integer> {
            int ptr = 0;

            @Override
            public boolean hasNext() {
                if (ptr < size)
                    return true;
                return false;
            }

            @Override
            public Integer next() {
                int fin = cont[ptr];
                ptr++;
                return fin;
            }

            @Override
            public void remove() {
            }
        }
    }

    private static class MODX {
        public static long t(long n1, long n2, long mod) {
            long k1 = (n1 * n2) % mod;
            if (k1 < 0)
                k1 += mod;
            return k1;
        }

        public static long pow(long n1, long pow, long mod) {
            if (pow == 0)
                return 1 % mod;
            else if (pow == 1)
                return t(1l, n1, mod);
            else if ((pow & 1) == 0) {
                long half = pow(n1, pow >> 1, mod);
                return t(half, half, mod);
            } else {
                long half = pow(n1, pow >> 1, mod);
                return t(half, t(half, n1, mod), mod);
            }
        }
    }

    private static class Shuffle {
        private static Random r1 = new Random();

        public static void ints(int[] l1, int n1, int n2) {
            for (int i = 0; i < n2 - n1; i++) {
                int k1 = i + r1.nextInt(n2 - n1 - i);
                int temp = l1[i + n1];
                l1[i + n1] = l1[k1 + n1];
                l1[k1 + n1] = temp;
            }
        }
    }

}
