n, m = map(int, input().split())
s = [int(input()) for _ in range(m)]
s.append(n + 1)

dp = [0] * (n + 1)
dp[0] = 1
MOD = 10 ** 9 + 7
for i in range(1, n + 1):
    if i not in s:
        x = dp[i - 1]
        if i > 1:
            x += dp[i - 2]
        dp[i] = x % MOD

print(dp[n])
