N,M=map(int,input().split())
ls=[]
for i in range(M):
    ls.append(int(input()))
ls.append(N+1)
import math 
from math import sqrt as r
p=math.pi
def A(n):
    if n==0:
        return 0
    else:
        X=(((1+r(5))/2)**n-((1-r(5))/2)**n)/r(5)
        return int(X)
k=0
ans=1
for x in ls:
    ans=ans*A(x-k)
    k=x+1
    if ans==0:
        break

print(int(ans%1000000007))    
    