def solve():
    N, M = map(int, input().split())
    A = [int(input()) for _ in range(M)]
    mm = 10 ** 9 + 7
    dp = [0] * (N + 1)
    dp[0] = 1  # 0段目に行くパターンは1とする
    dp[1] = 0 if 1 in A else 1  # 1段目の行き方を設定
    for i in range(2, N + 1):
        if i in A:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mm
    print(dp[N])


if __name__ == '__main__':
    solve()
