import collections
q = collections.deque([1])
n,m = map(int, raw_input().split(' '))
forbidden = set([int(raw_input()) for _ in range(m)])

mod = (10 ** 9) + 7
for w in range(1,n+1):
	if w not in forbidden:
		q.append(sum(q) % mod)
	else:
		q.append(0)
	if len(q) == 3:
		q.popleft() 
print q[-1]
	
