import sys
import numpy as np

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

N, M = map(int, input().split())
a = np.array([int(input()) for _ in range(M)])

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

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