MOD = 1000000007

N,M = map(int,input().split())
A=[int(input()) for i in range(M)]



def binet_mod(n):
    if(n==0):
        return 0
    return((int(1/5**(1/2)*((((1+5**(1/2))/2)**n)-((1-5**(1/2))/2)**n)))%MOD)
    

l = 0
ans = 1

for i in range(M):
    ans = ans * binet_mod(A[i] - l)
    l = A[i] + 1
    

ans = (ans * binet_mod(N-l+1))%MOD
print(ans)