nm = [int(s) for s in input().split()]


def fib(n) :
    if n==1 :
        return 1
    elif n==0 :
        return 1
    else :
        return fib(n-1) + fib(n-2)
a=[]
b=1
for i in range(nm[1]):
    a.append(int(input()))
    if a[i]-a[i-1] == 1 :
        b=0

def rest(num) :
    return num % 1000000007
c=0
if b==0 :
    print(c)
else :
    for i in range(nm[1]+1):
        if i == 0:
            c += rest(fib(a[i]-1))
        elif i == nm[1]:
            c = rest(c * fib(nm[0]-a[i-1]-1))
        else :
            c = rest(c * fib(a[i]-a[i-1]-2))
    print(c)
