mod = 1000000007
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
ans = 0
dp = [0 for _ in range(n+1)]
dp[0] = 1
for i in range(n):
    dp[i] %= mod
    if i in a:
        continue
    if i + 1 <= n:
        dp[i+1] += dp[i]
    if i + 2 <= n:
        dp[i+2] += dp[i]
print(dp[n] % mod)