n, m = map(int, input().split())

def fib(n):
    r5 = 5**0.5
    f = 1/r5*((0.5+r5/2)**n-(0.5-r5/2)**n)
    return int(f)

a = []
for i in range(m):
    a.append(int(input()))
ans = fib(a[0])
for i in range(m-1):
    ans *= fib(a[i+1]-a[i]-1)
    ans %= 1000000007
ans *= fib(n-a[-1])
print(ans%1000000007)
