import numpy as np
MOD = 1000000007
def F(n):
  root = np.sqrt(5)
  return int(1/root * (((1+root)/2)**n - ((1-root)/2)**n))

n,m = map(int, input().split())
a = [0] + [int(input()) for _ in range(m)] + [n]
dif = [0]*(m+1)
for i in range(m+1):
  dif[i] = F(a[i+1] - a[i] - 1)%MOD

print(np.cumprod(dif)[-1])