import math
N, M = map(int,input().split())
a = [int(input()) for i in range(M)]
b = [-1]
b.extend(a)
b.extend([N+1])
ans = 1
def fibo(t):
    if t == 0:
        return 0
    else:
        fi = (int(1/math.sqrt(5)*(((1+math.sqrt(5))/2)**dan-((1-math.sqrt(5))/2)**dan)+0.01))%1000000007
        return fi
for i in range(M+1):
    dan = b[i+1]-1 - b[i]
    ans = ans*fibo(dan)%1000000007
print(ans)