N, M = map(lambda x: int(x), input().split())
a = [int(input()) for i in range(M)]
#print(N)
#print(M)
#print(a)
old = [0]
while not all(map(lambda y: y==N, old)):
  new = []
  for x in old:
    if x == N:
      new.append(x)
    if x+1 not in a and x+1 <= N:
      new.append(x+1)
    if x+2 not in a and x+2 <= N:
      new.append(x+2)
  old = new
print(len(old)%1000000007) 
