n, m = [int(i) for i in input().split()]
a = [-1] + [int(input()) for _ in range(m)] + [n+1]

fib_l = [-1] * n

def fib(step):
    if step < 0:
        return 0
    if fib_l[step] != -1:
        return fib_l[step]
    if 0 <= step <= 1:
        return 1
    else:
        t = fib(step-1) + fib(step-2)
        fib_l[step] = t
        return t

ret = 1
for i in range(m+1):
    ret *= fib(a[i+1] - a[i] - 2)
print(ret % 1000000007)