import math
N, M = map(int,input().split())
a = [int(input()) for i in range(M)]
b = [-1]+ a+ [N+1]
def combination(n, k):
    result = 1
    for i in range(n - k + 1, n + 1):
        result *= i
    for i in range(1, k + 1):
        result /= i
    return result

def fibonacci(k):
    k = k + 1
    result = 0
    for i in range(1, int(math.ceil(k / 2.0) + 1)):
        result += combination(k, 2 * i - 1) * pow(5, i - 1)
    return int(result / pow(2, k - 1))

def combi(d):
    if d < 0:
        return 0
    elif 0 <= d <= 1:
        return 1
    else:
        return fibonacci(d)
ans = 1
for i in range(len(b)-1):
    ans= (ans*combi(b[i+1]-b[i]-2))%1000000007
print(ans)