from math import *

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


def how_many_ways(lst_of_broken_steps,goal):

    for i in range(len(lst_of_broken_steps)-1):#連続しているbrokenステップがあった時
        if lst_of_broken_steps[i]+1==lst_of_broken_steps[i+1]:
            return 0
    if len(lst_of_broken_steps)==0:#brokenstepがない場合
        return fib(goal)%1000000007
    #1回目のbrokenステップの処理
    ans = fib(lst_of_broken_steps[0]-1)
    ans = ans % 1000000007

    for i in range(1,len(lst_of_broken_steps)):#2回目以降のbrokenステップの処理
        ans *= fib((lst_of_broken_steps[i]-1)-(lst_of_broken_steps[i-1]+1))
        ans = ans%1000000007
    

    #最後のbrokenステップの処理の後からゴールまで
    ans *= fib(goal-(lst_of_broken_steps[-1]+1))

    return ans % 1000000007



goal,n = map(int,input().split())
lst_of_broken_steps = []
for i in range(n):
    lst_of_broken_steps.append(int(input()))

print(int(how_many_ways(lst_of_broken_steps,goal)))