import math
 
N, M = list(map(int, input().split()))
a = []

for i in range(M):
  a.append(int(input()))
  
answer = 0
# a = [3]
for i in range(len(a) + 1):
	if i == 0:
		dif = a[i] - 1
	elif i == len(a):
		dif = N - a[-1] - 1
	else:
		dif = a[i] - a[i - 1] - 2
	if dif >= 2:
		b = dif // 2
		tmp_sum = 0
		for j in range(b + 1):
			tmp_sum += math.factorial(j + dif - j * 2) / (math.factorial(j) * math.factorial(dif - j * 2))
			# print(tmp_sum)
		if tmp_sum != 0 and answer == 0:
			answer += 1
		answer *= tmp_sum
    
print(answer % 1000000007)