s,n=map(int,input().split())
x=list(int(input()) for _ in range(n))

w0=1
b0=0
cnt=0

for i in range(1,s):
	if i==x[cnt]:
		w1=0
		b1=w0
		w0=w1
		b0=b1
		if cnt<len(x)-1: 
			cnt+=1
	else:
		w1=b0+w0
		b1=w0
		w0=w1
		b0=b1

print((w0+b0)%1000000007) 