import itertools
import numpy as np
n, m = map(int, input().split())
a = []
for i in range(m):
    a.append(int(input()))
if n % 2 == 0:
    nn = n / 2
else:
    nn = (n - 1) / 2
nn = int(nn)
count = 0
for k in range(nn + 1):   #nじゃない
    searchlist = np.zeros(n)
    for i in range(n - 2*k):
        searchlist[i] = 1
    for i in range(k):
        searchlist[i + (n - 2*k)] = 2
    searchlist = searchlist.tolist()
    searchlist = [i for i in searchlist if i > 0]
    searchseed = len(searchlist)
    if searchseed == n:
        searcher = [1]
    elif searchseed == n // 2:
        searcher = [2]
    else:
        searcher = [1, 2]
    #print(searchseed)
    for search in itertools.product(searcher, repeat = searchseed):
        if not sum(search) == n:
             continue
        #print(search)
        position = 0
        flag = 0
        for step in search:
            position += step
            if position in a:
                break
            else:
                flag +=1
        if flag == len(searchlist):
            count +=1
print(count % 1000000007)