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

def get_number(s):
	if s==0:
		return 1
	else:
		DP=[0]*s
		DP[0]=1
		DP[1]=1
		for i in range(2,s):
			DP[i]=DP[i-1]+DP[i-2]
    
		return DP[s-1]
Cnt = get_number(A[0]-1)
for i in range(M-1):
	Cnt = Cnt*get_number(A[i+1]-A[i]-1)
    
Cnt = Cnt*get_number(N-A[M-1])
print(Cnt%1000000007)