import math
N,M=map(int,input().split())
broken=[]
for i in range(M):
  broken.append(int(input()))
def count(A,B):
  ans=0
  if A==B or B-A==1:
    return 1
  elif B<A:
    return 0
  if (A%2==0 and B%2==0) or (A%2==1 and B%2==1):
    for i in range((B-A)//2+1):
      n=B-A-2*i+i
      ans+=math.factorial(n)//math.factorial(i)//math.factorial(n-i)
    return ans
  else:
    return count(A+1,B)+count(A+2,B)
if M!=0:
  V=1
  for i in range(M):
    if i==0:
      V*=count(0,broken[i]-1)
    else:
      V*=count(broken[i-1]+1,broken[i]-1)
  V*=count(broken[-1]+1,N)
  print(V%(10**9+7))
else:
  print(count(0,N)%(10**9+7))