import numpy as np
import math

N,M = list(map(int, input().split()))

aList = [int(input()) for _ in range(M)]

aList.insert(0,-1)
aList.append(N+1)

#print(aList)

aArray = np.array(aList)

katamari = []

for i in range(M+1):
    katamari.append(aArray[i+1] - aArray[i] - 1)

#print(katamari)

ans = 1
for i in range(M):
    ans *=  (1 / math.sqrt(5)) * (((1 + math.sqrt(5)) / 2) ** katamari[i] - ((1 - math.sqrt(5)) / 2) ** katamari[i])

print(int(ans) % 1000000007)