import math

def f(n):
    global memo
    if memo[n]==0:
        ans = 0
        for i in range(n+1):
            cnt_1 = n - 2*i
            cnt_2 = 0 + 1*i
            if cnt_1 < 0:
                break
            else:
                ans += math.factorial(cnt_1+cnt_2)//(math.factorial(cnt_1)*math.factorial(cnt_2))
        memo[n] = ans
    return memo[n]

memo = [0] * (10**5 + 1)

n,m = map(int,input().split())
start = 0
ans = 1
for i in range(m):
    a = int(input())
    if start == a:
        ans = 0
        break
    else:
        ans = ans * f((a-1)-start)
        start = a + 1
ans = ans * f(n-start)
print(ans%1000000007)
