n,m = map(int,input().split())
ali = [int(input()) for _ in range(m)]
dif = []
cap = 0
for num in ali:
  dif.append(num-cap)
  cap = num
dif.append(n-cap+1)
dif[0] += 1
ref = [0,0,1,1]
a,b = 1,1
for i in range(1000):
  a,b = b,a+b
  ref.append(b)
ans = 1
for num in dif:
  ans *= ref[num]
print(ans % 1000000007)