n,m=map(int,input().split())
a=[]
for _ in range(m):
   a.append(input())

def fb(num):
    a, b = 1, 0
    for _ in range(num):
        a, b = a + b, a
    if num==-1:
        b=0
    return b 

sum=fb(int(a[0]))

for i in range(m-1):
    sum=sum*fb(int(a[i+1])-int(a[i])-1)

sum=sum*fb(n-int(a[m-1]))

print(sum % (10**9+7))