Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

s = int(input())



if s <= 2:
    print(0)
else:
    a = [0] * (s + 1)
    a[0] = 1
    for i in range(3, s + 1):
        a[i] = int((a[i - 1] + a[i - 3]) % (1e9 + 7))

print(a[s])

Fixed submission:
#!/usr/bin/env python3

s = int(input())



if s <= 2:
    print(0)
else:
    a = [0] * (s + 1)
    a[0] = 1
    for i in range(3, s + 1):
        a[i] = int((a[i - 1] + a[i - 3]) % (1e9 + 7))

    print(a[s])

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3


s = int(input())

#2以下だったら0で決まり
if s <= 2:
    print(0)


else:
    #結果
    result = 0
    #項数でループ
    for i in range(1, s // 3 + 1):
        # #あまり
        r = s - i * 3

        if r == 0:
            result += 1
        else:
            h = 1
            # for j in range(1, r + 1):
            #     h *= ((j + i - 1) / j)

            for j in range(1, r + 1):
                h *= (j + i - 1)

            for j in range(1, r + 1):
                h //= j

            result += h
        result %= int(1e9 + 7)

    print(int(result))







Fixed submission:
#!/usr/bin/env python3

s = int(input())



if s <= 2:
    print(0)
else:
    a = [0] * (s + 1)
    a[0] = 1
    for i in range(3, s + 1):
        a[i] = int((a[i - 1] + a[i - 3]) % (1e9 + 7))

    print(a[s])

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3


s = int(input())

#2以下だったら0で決まり
if s <= 2:
    print(0)


else:
    #結果
    result = 0
    #項数でループ
    for i in range(1, s // 3 + 1):
        # #あまり
        r = s - i * 3

        if r == 0:
            result += 1
        else:
            h = 1
            # for j in range(1, r + 1):
            #     h *= ((j + i - 1) / j)

            for j in range(1, r + 1):
                h *= (j + i - 1)

            for j in range(1, r + 1):
                h //= j

            result += int(h)
        result %= int(1e9 + 7)

    print(int(result))







Fixed submission:
#!/usr/bin/env python3

s = int(input())



if s <= 2:
    print(0)
else:
    a = [0] * (s + 1)
    a[0] = 1
    for i in range(3, s + 1):
        a[i] = int((a[i - 1] + a[i - 3]) % (1e9 + 7))

    print(a[s])

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3


s = int(input())

#2以下だったら0で決まり
if s <= 2:
    print(0)


else:
    #結果
    result = 0
    #項数でループ
    for i in range(1, s // 3 + 1):
        # #あまり
        r = s - i * 3

        if r == 0:
            result += 1
        else:
            h = 1.0
            # print(r)
            # for j in range(r, 0, -1):
            #     h *= ((j + i - 1) / j)

            # for j in range(1, r + 1):
            #     h *= ((j + i - 1) / j)
            #     print(h)

            for j in range(1, r + 1):
                h *= (j + i - 1)

            for j in range(1, r + 1):
                h //= j

            result += int(h)
        result %= int(1e9 + 7)

    print(int(result))







Fixed submission:
#!/usr/bin/env python3

s = int(input())



if s <= 2:
    print(0)
else:
    a = [0] * (s + 1)
    a[0] = 1
    for i in range(3, s + 1):
        a[i] = int((a[i - 1] + a[i - 3]) % (1e9 + 7))

    print(a[s])