N,M = map(int,input().split())
S = []
for _ in range(M):
  S.append(int(input()))
S.sort()  

def Fib(n):    
    if n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return Fib(n-1)+Fib(n-2)
      
for i in range(M):
  if i == 0:
    P = Fib(S[i]+1)
  else:
    P *= Fib(S[i] - S[i-1])
  if i == M-1:
    P *= Fib(N - S[i] + 1)

print(P%1000000007)