n, m = map(int, input().split())
a = ([int(input()) for _ in range(m)])
a.insert(0, 0)
a.append(n)
#print(a)

def f(n):
    n += 1
    if n==2:
        return 1 
    else:
        fib1 = 1
        fib2 = 1
        for i in range(n-2):
            fib3 = fib1+fib2
            fib1 = fib2
            fib2 = fib3
        return fib2

ans = 0
flag = True
if m > 1:
    for i in range(1, m):
        if a[i+1] - a[i] == 1:
            print(0)
            flag = False
if flag:
    for i in range(m):
        s = f(a[i+1]-(a[i])-1)
        ans += s%1000000007
    print(ans)

