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

n,m = map(int, input().split())
a = [-1] + [int(input()) for i in range(m)] + [n+1]
a = [i-2 for i in a]
a = list(map(F, a))
print(np.prod(a))