import math
N, M = map(int,input().split())
a = [int(input()) for i in range(M)]
b = [-1]
b.extend(a)
b.extend([N+1])
ans = 1
import sympy as sym
def fibo(n):

    x = sym.symbols('x',nonnegative=True,integer=True)
    Fib=1/sym.sqrt(5)*(((1+sym.sqrt(5))/2)**(n-1)-((1-sym.sqrt(5))/2)**(n-1))
    result=Fib.subs(x,n)
    result=sym.simplify(result) #式の整理
    return result

for i in range(M+1):
    dan = b[i+1]-1 - b[i]
    ans = ans*fibo(dan+1)%1000000007
print(ans)