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.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.Locale;
import java.io.OutputStream;
import java.util.RandomAccess;
import java.io.PrintWriter;
import java.util.AbstractList;
import java.io.Writer;
import java.util.List;
import java.io.IOException;
import java.util.Arrays;
import java.math.BigDecimal;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Jacob Jiang
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    private static final long MOD = (long) (1e9 + 7);
    private static long[] factorial = NumberUtils.generateFactorial(1000, MOD);
    private static long[] reverseFactorial = NumberUtils.generateReverseFactorials(1000, MOD);

    private long calc(int x) {
        return NumberUtils.powMod(2, x - 1, MOD);
    }

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        int[] on = in.nextIntArray(m);
        ArrayUtils.decreaseByOne(on);
        Arrays.sort(on);
        long answer = 1;
        List<Integer> list = new ArrayList<Integer>();
        if (on[0] > 0) {
            list.add(on[0]);
        }
        if (on[on.length - 1] < n - 1) {
            list.add(n - 1 - on[on.length - 1]);
        }
        for (int i = 1; i < on.length; i++) {
            if (on[i] - on[i - 1] > 1) {
                list.add(on[i] - on[i - 1] - 1);
                answer *= calc(on[i] - on[i - 1] - 1);
                answer %= MOD;
            }
        }
        answer *= factorial[n - m];
        answer %= MOD;
        for (int item : list) {
            answer *= reverseFactorial[item];
            answer %= MOD;
        }
        out.println(answer);
    }
}

class NumberUtils {

    public static long powMod(long a, long b, long mod) {
        if (b < 0 || mod <= 0)
            throw new IllegalArgumentException();
        a %= mod;
        if (a < 0)
            a += mod;
        return powModImpl(a, b, mod);
    }

    private static long powModImpl(long a, long b, long mod) {
        if (b == 0) {
            return 1L;
        }
        long result = powModImpl(a, b >> 1, mod);
        result = (result * result) % mod;
        if (b % 2 == 1) {
            result = (result * a) % mod;
        }
        return result;
    }

    public static long[] generateFactorial(int count, long module) {
        long[] result = new long[count + 1];
        if (module == -1) {
            if (count != 0)
                result[0] = 1;
            for (int i = 1; i <= count; i++)
                result[i] = result[i - 1] * i;
        } else {
            if (count != 0)
                result[0] = 1 % module;
            for (int i = 1; i <= count; i++)
                result[i] = (result[i - 1] * i) % module;
        }
        return result;
    }

    public static long[] generateReverse(int count, long module) {
        if (count < 0)
            throw new IllegalArgumentException();
        long[] result = new long[count + 1];
        if (count > 0)
            result[1] = 1;
        for (int i = 2; i <= count; i++)
            result[i] = (module - module / i * result[((int) (module % i))] % module) % module;
        return result;
    }

    public static long[] generateReverseFactorials(int count, long module) {
        if (count < 0)
            throw new IllegalArgumentException();
        long[] result = generateReverse(count, module);
        result[0] = 1;
        for (int i = 1; i <= count; i++)
            result[i] = result[i] * result[i - 1] % module;
        return result;
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1 << 16];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

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

    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 & 15;
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

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

    public int[] nextIntArray(int count) {
        int[] result = new int[count];
        for (int i = 0; i < count; i++) {
            result[i] = nextInt();
        }
        return result;
    }

    }

class OutputWriter {
    private PrintWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void println(long x) {
        writer.println(x);
    }

    public void close() {
        writer.close();
    }

    }

class ArrayUtils {



    public static void decreaseByOne(int[]... arrays) {
        for (int[] array : arrays) {
            for (int i = 0; i < array.length; i++) {
                array[i]--;
            }
        }
    }



    }

