Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x > sum(d):
    ans += 1

print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n):
    if count > x:
        ans = i
        break
    elif i = n - 1:
        ans = n
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n - 2):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n - 1):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n + 2):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n + 1):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)