n,m=map(int,input().split())
a=[-1]
d=[]
for i in range(m):
 a.append(int(input()))
a.append(n+1)
for i in range(m+1):
 d.append(a[i+1]-a[i]-1)
ansk=1
for i in range(m+1):
 k=int(((1+5**(1/2)/2)**d[i]-(1-5**(1/2)/2)**d[i])/(5**1/2))
 ansk*=k
print(ansk%1000000007)
