import numpy as np

n,m=map(int, input().split()) 
broken_list = np.array([])
for i in np.arange(m):
    broken_list = np.append(broken_list,int(input()))

stages = np.append(broken_list, n+1)-np.append(0,broken_list)-2
if stages[0]==-1:
    stages[0]=0
stages
def fib(n):
    if n<0:
        return 0
    else:
        f = ((1 + 5**0.5) / 2)**(n+1) / 5**0.5 + 0.5
        return int(f)
      
fibs = [fib(n)%1000000007 for n in stages]
result = 1
for i in fibs:
    result *= i
    result%=1000000007
    
print(result)
