N, M = map(int, input().split())
MOD = 1000000007

broken = []
for i in range(M):
    broken.append(int(input()))

ans = 1

dp = [0] * (N + 1)
dp[N-1] = dp[N] = 1
for i in reversed(range(N-1)):
    if i in broken:
        dp[i] = 0
        continue
    dp[i] = (dp[i+1] + dp[i+2]) % MOD

print(dp[0])
