n, m = map(int, input().split())
li = []
for i in range(m):
    li.append(int(input()))


def fib(dan):
    if dan == 1:
        return 1
    elif dan == 2:
        return 1
    else:
        a1 = 1
        a2 = 1
        a3 = 0
        for _ in range(dan-2):
            a3 = a1 + a2
            a1 = a2
            a2 = a3

        return a3

ans = fib(li[0])

for i in range(m-1):
    ans = ans * fib(li[i+1] - li[i] - 1 ) % 1000000007

ans = ans * fib(n - li[m-1]) % 1000000007
print(ans)
