Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    if 1 not in a:
        dp[1] = 1

    if n > 1:
        if 2 not in a:
            dp[2] = 1 + dp[1]

        for i in range(3, n + 1):
            if i not in a:
                dp[i] = (dp[i-2] + dp[i-1]) % mod

    print(dp[n])


Fixed submission:
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    for aa in a:
        dp[aa] = -1

    if dp[1] != -1:
        dp[1] = 1
    else:
        dp[1] = 0

    if n > 1:
        if dp[2] != -1:
            dp[2] = 1 + dp[1]
        else:
            dp[2] = 0

        for i in range(3, n+1):
            if dp[i] != -1:
                dp[i] = (dp[i-2] + dp[i-1]) % mod
            else:
                dp[i] = 0

    print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    if 1 not in a:
        dp[1] = 1

    if n > 1:
        if 2 not in a:
            dp[2] = 1 + dp[1]

        for i in range(3, n + 1):
            if i not in a:
                dp[i] = (dp[i-2] + dp[i-1]) % mod

    print(dp[n])


Fixed submission:
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    for aa in a:
        dp[aa] = -1

    if dp[1] != -1:
        dp[1] = 1
    else:
        dp[1] = 0

    if n > 1:
        if dp[2] != -1:
            dp[2] = 1 + dp[1]
        else:
            dp[2] = 0

        for i in range(3, n+1):
            if dp[i] != -1:
                dp[i] = (dp[i-2] + dp[i-1]) % mod
            else:
                dp[i] = 0

    print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    if 1 not in a:
        dp[1] = 1

    if n > 1:
        if 2 not in a:
            dp[2] = 1 + dp[1]

        for i in range(3, n + 1):
            if i not in a:
                dp[i] = dp[i-2] + dp[i-1]

    print(dp[n] % mod)


Fixed submission:
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    for aa in a:
        dp[aa] = -1

    if dp[1] != -1:
        dp[1] = 1
    else:
        dp[1] = 0

    if n > 1:
        if dp[2] != -1:
            dp[2] = 1 + dp[1]
        else:
            dp[2] = 0

        for i in range(3, n+1):
            if dp[i] != -1:
                dp[i] = (dp[i-2] + dp[i-1]) % mod
            else:
                dp[i] = 0

    print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    if 1 not in a:
        dp[1] = 1

    if n > 1:
        if 2 not in a:
            dp[2] = 1 + dp[1]

        for i in range(3, n + 1):
            if i not in a:
                dp[i] = dp[i-2] + dp[i-1]

    print(dp[n] % mod)


Fixed submission:
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = map(int, input().split())
    a = list()
    for i in range(m):
        a.append(int(input()))

    dp = [0] * (n + 1)

    for aa in a:
        dp[aa] = -1

    if dp[1] != -1:
        dp[1] = 1
    else:
        dp[1] = 0

    if n > 1:
        if dp[2] != -1:
            dp[2] = 1 + dp[1]
        else:
            dp[2] = 0

        for i in range(3, n+1):
            if dp[i] != -1:
                dp[i] = (dp[i-2] + dp[i-1]) % mod
            else:
                dp[i] = 0

    print(dp[n])