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

def fib(n):
    if n == 0:
        return 0
    elif n <= 2:
        return 1
    else:
        return fib(n-1)+fib(n-2)

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)
