N, B = map(int, input().split())
ana = []
dp = [0] * (N+2)

for i in range(B):
    ana.append(int(input()))

mod = 1000000007

dp[N] = 1
for i in reversed(range(N)):
    if i in ana:
        dp[i] = 0
        ana.pop(len(ana)-1)
        continue
    dp[i] = dp[i + 1] + dp[i + 2]
print(dp[0] % mod)