import sys
if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline

N, M = map(int, input().split())
a = [0 for _ in range(M)]
for i in range(M):
	a[i] = int(input())

dp = [0 for _ in range(N+1)]
dp[0] = 1

for i in range(N+1):
	if a.count(i):
		continue
	for j in [1, 2]:
		if i - j >= 0 and not a.count(i-j):
			dp[i] += dp[i-j]
print(dp[-1]%1000000007)