def resolve():
    n, m = map(int, input().split())

    # i段目に到達するまでのルートの総数
    dp = [1] * (n + 1)

    a = [int(input()) for _ in range(m)]

    for i in range(1, n + 1):
        if i in a:
            dp[i] = 0
            continue

        dp[i] = dp[i - 1]
        if i >= 2:
            dp[i] += dp[i - 2]

    print(dp[n] % (10 ** 9 + 7))
    
resolve()