import math
n,m = map(int,input().split())
before = -1
alls = 1
a = -1
if m != 0:
        for i in range(m):
                a = int(input())
                b = (a - before - 2) // 2
                c = a - before - 2
                ptr = 0
                for j in range(b + 1):
                        ptr += math.factorial(c - j) / (math.factorial(j) * math.factorial(c - 2 * j))
                alls = alls * ptr
                before = a
ptr = 0
b = (n - a - 1) // 2
c = n - a - 1
for j in range(b + 1):
        ptr += math.factorial(c - j) / (math.factorial(j) * math.factorial(c - 2 * j))
alls = alls * ptr
print(int(alls % 1000000007))