N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
inf = float("inf")
dp = [inf] * (N+1)
dp[0] = 1
for i in range(1,N+1):
	if i in A:
		continue

	if i == 1:
		dp[i] = dp[0]
		continue

	a = dp[i-2] if dp[i-2] != inf else 0
	b = dp[i-1] if dp[i-1] != inf else 0

	dp[i] = (a + b) % 1000000007


print(dp[N])