N, M = map(int, input().split())
List = [int(input()) for _ in range(M)]

import math

def counter(x):
    import math
    arr= []
    u = int(x/2)
    for i in range(u+1):
        one = x-2*i
        two = i
        cnt = math.factorial(x-2*i)/(math.factorial(one)*math.factorial(two))
        arr.append(cnt)
    return(int(sum(arr)))

nList = list(set(List))
flg = 0

for j in range(len(nList)-1):
    if (nList[j+1]-nList[j]==1):
        flg = 1

if flg==1:
    print(0)
    
else:
    cnt = []
    arr = []
    nList = [0]+nList        
    for k in range(len(nList)-1):
        cnt.append(counter(nList[k+1]-nList[k]))
    ans = int(sum(cnt))*counter(N-nList[-1])
    print(ans%1000000007)