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