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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count)-1
            exit()

    print(count)


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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count+1)
            exit()

    print(count)

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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count)

    print(count)


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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count+1)
            exit()

    print(count)

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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        i += 1

    print(count)


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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count+1)
            exit()

    print(count)

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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0

while True:
    
    
    d[i] = d[i-1] + l[i-1]
    count += 1
    
    if d[i] > x:
        break
    i += 1

print(count)


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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count+1)
            exit()

    print(count)