import math

def fib(n):
    return round((((1+5**0.5)/2)**n-((1-5**0.5)/2)**n)/5**0.5)

n,m = map(int,input().split())
a_list = [int(input()) 
          for nesya in range(m)]
a_list.append(n+1)
ans = 1
mae = -1
for a in a_list:
  k = a-mae-1
  mae = a
  ans = (ans*int(fib(k)))%(10**9+7)
print(ans)
  