from math import factorial
n,m,*a=map(int,open(0).read().split())
s=0
c=[0]*(1+len(a))
p=1
for j,e in enumerate(a+[n+1]):
  d=e-1-s
  m=d//2
  for i in range(m+1):
    l=d-i*2
    c[j]+=int(factorial(l+i)/factorial(l)/factorial(i))
  s=e+1
  p*=c[j]
print(p%1000000007)