N, M = [int(s) for s in input().split(' ')]
steps = [1] * (N + 1)
for m in range(M):
    a = int(input())
    steps[a] = -1
patterns = 1
mod = 1000000007
d = {
    0: 1,
    1: 1,
    2: 2,
}
mcn_d = {}
def mcn(m, n):
    if (m, n) in mcn_d:
        return mcn_d[(m, n)]
    mm = 1
    nn = 1
    for i in range(n):
        mm *= (m - i)
        nn *= (n - i)
    ret = mm // nn
    mcn_d[(m, n)] = ret
    return ret

def doit(n):
    if n in d:
        return d[n]
    ret = 0
    for two in range(n // 2 + 1):
        one = n - two * 2
        if one < 0:
            break
        ret += mcn(one + two, min(one, two))
    d[n] = ret
    return ret

conts = []
ret = 1
cont = 0
for step in steps:
    if cont == 0:
        cont += step
    elif cont > 0:        
        if step == 1:
            cont += step
        else:
            conts.append(cont)
            cont = step
    else:  # cont < 0
        if step == -1:
            cont += step
            ret *= 0
        else:
            conts.append(cont)
            cont = step
conts.append(cont)

for cont in conts:
    if cont < 0:
        continue
    ret *= doit(cont - 1)

print(ret % mod)
