import math
n, m = map(int, input().split())
a = [0]
sum = 0
flag = 0
for i in range(m):
    ain = int(input())
    a.append(ain)
a.append(n)
for i in range(len(a)-1):
    if a[i+1] - a[i] == 1 and a[i] != 0:
        flag = 1
        break
    if a[i+1] - a[i] >= 2 and (a[i+1] - a[i])%2 == 0:
        for j in range(int((a[i+1]-a[i])/2+1)):
            sum += math.factorial((a[i+1]-a[i])/2+j)/(math.factorial((a[i+1]-a[i])/2-j) * math.factorial(2*j))
    if a[i+1] - a[i] >= 2 and (a[i+1] - a[i])%2 == 1:
        for j in range(int(math.ceil((a[i+1]-a[i])/2))):
            sum += math.factorial(math.ceil((a[i+1]-a[i])/2))/((math.factorial(math.floor((a[i+1]-a[i])/2)-j))*math.factorial(1+j*2))
if flag == 1:
    print(0)
else:
    print(int(sum%1000000007))