MOD = 1e9 + 7

N, M = [int(i) for i in input().split()]
issafe = [True] * (N + 1)
for i in range(M):
    a = int(input())
    # a 段目は壊れている
    issafe[a] = False

# dp
dp = [0] * (N + 1)
# 初期化
dp[0] = 1
if issafe[1]:
    dp[1] = 1

for i in range(2, N + 1):
    # i - 1 段目が安全なら
    if issafe[i - 1]:
        dp[i] += dp[i - 1]
    # i - 2 段目が安全なら
    if issafe[i - 2]:
        dp[i] += dp[i - 2]
    dp[i] %= MOD
print(dp[N])
