N,M = map(int, input().split())
total = 1
a = [int(input())]
total *= (((1+5**0.5)/2)**a[0] - ((1-5**0.5)/2)**a[0])/5**0.5
for i in range(M-1):
  b = int(input())
  a.append(b)
  c = a[i+1] - a[i] - 1
  total *= (((1+5**0.5)/2)**c - ((1-5**0.5)/2)**c)/5**0.5
total *= (((1+5**0.5)/2)**(N-a[M-1]) - ((1-5**0.5)/2)**(N-a[M-1]))/5**0.5
print(int(total % 1000000007))