def fib(n):
	if n<0:
		return 0
	if n in [0, 1]:
		return 1
	return fib(n-1) + fib(n-2)

N, M = map(int, input().split())
if M==0:
	ans = fib(N)
else:
	A = [int(input()) for _ in range(M)]
	A.append(N+1)
	ans = fib(A[0]-1)
	for i in range(M):
		ans = ans * fib(A[i+1]-A[i]-2)

print(ans%1000000007)