z = input().split()
z = [ int(x) for x in z]
broken = []
for i in range(z[1]):
    broken.append(input())
#print(broken)

max_step = z[0] 
import numpy as np

all_possible = []

def steps(cand):
  tmp = np.zeros_like(cand)
  for j in range(len(cand)):
    tmp[j] = sum(cand[:j+1])
  return tmp


count = 0
all_count = 0

for i in range(int(max_step/2), max_step+1):
    #iは段の数
        
    import itertools
    A = [1 , 2 ]
    for v in itertools.product(A, repeat = i):
      if sum(v) == max_step:
        all_count += 1
        for b in broken:
          if list(steps(v)).count(int(b)) > 0:
            count += 1
            break
        
#         all_possible.append(steps(v))
          
 

#for i in range(len(all_possible)):
  #all_possible[i] = steps(all_possible[i])
#  all_count += 1
 # for b in broken:
    #print( list(all_possible[i]).count(int(b)))
  #  if  list(all_possible[i]).count(int(b)) > 0:
    #    all_possible[i]= [0,0]
       # count += 1
        
print((all_count - count)%1000000007)