N, M = map(int,input().split())
data = []
for i in range(M):
    data.append(int(input()))
dp = [0] * (N + 2)
dp[0] = 1
mod = 10**9 + 7
for i in range(N):
    if not i + 1 in data:
        dp[i + 1] += dp[i]
    if not i + 2 in data:
        dp[i + 2] += dp[i]
print(dp[N] % mod)
