from math import factorial


N, M = map(int, input().split())
a=[]
for i in range(M):
    tmp = int(input())
    if 0 < i:
        if a[-1]+1 == tmp:
            print(0)
            exit()
    a.append(tmp)
p = 0
a.append(N)
cnt = 0
data = {}
for sep in a:
    ls = list(range(p, sep))
    p = sep + 1
    l = len(ls) - 1
    print(l, ls)
    tmp = 0
    for i in range(l // 2 + 1):
        two = i
        one = l - i*2
        tmp += factorial(l) / (factorial(two) * factorial(one))
    cnt += tmp
    print('cnt:', cnt)
    
print(int(cnt % 1000000007))
