Problem:
 Score : 200 points    Problem Statement A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0 , and the i -th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1} .  How many times will the ball make a bounce where the coordinate is at most X ?      Constraints  1 \leq N \leq 100  1 \leq L_i \leq 100  1 \leq X \leq 10000  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  X  L_1  L_2  ...  L_{N-1}  L_N       Output Print the number of times the ball will make a bounce where the coordinate is at most X .        Sample Input 1 3 6
3 4 5      Sample Output 1 2  The ball will make a bounce at the coordinates 0 , 3 , 7 and 12 , among which two are less than or equal to 6 .       Sample Input 2 4 9
3 3 3 3      Sample Output 2 4  The ball will make a bounce at the coordinates 0 , 3 , 6 , 9 and 12 , among which four are less than or equal to 9 .

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
c = 0
for l in L:
    D.append(D[-1] + l)
for i in D:
    if i <= X:
        c += 1
print(c)

Solution (Python):


def main():
    N, X = map(int, input().split())
    *L, = map(int, input().split())

    D = [0]
    for i in range(0, N):
        D.append(D[i] + L[i])

    cnt = 0
    for i in range(len(D)):
        if D[i] <= X:
            cnt += 1
    print(cnt)


main()

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
num = 1
for i in range(len(L)):
  D = D + L[i]
  if D <= X:
    num += 1
  else:
    break
print(num)

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
c=1
for i in range (0,n):
  d=d+l[i]
  if d<=x:
    c+=1
print(c)

Solution (Python):
from sys import exit

n,x=map(int,input().split())
L=list(map(int,input().split()))
p=0
res=1

for l in L:
	p+=l
	if p>x:
		print(res)
		exit()
	res+=1
    
print(res)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
d = 0
for i in range(N):
    d = d + L[i]
    if d <= X:
        cnt += 1
print(cnt)

Solution (Python):

from itertools import accumulate

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

b = list(accumulate(l))  

b_n=[int(i) for i in b if i<=x]
print(len(b_n)+1)

Solution (Python):

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

D = [0]
tmp = 0
for i in l:
    tmp += i
    D.append(tmp)
    
D = [i for i in D if i <= x]

print(len(D))

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
ans=1
i=0
for i in range(n):
  d+=l[i]
  if d<=x:
    
    ans+=1
    
  else:
    break
  
print(ans)

Solution (Python):
def main():
    from itertools import takewhile

    N, X = map(int, input().split())
    *L, = map(int, input().split())

    def accumulate(a):
        s = 0
        yield s
        for x in L:
            s += x
            yield s

    ans = len(tuple(takewhile(lambda s: s <= X, accumulate(L))))

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N,X = map(int,input().split())
L =[0] + list(map(int,input().split()))

D = [0 for i in range(N+2)]
cnt = 1
for i in range(2,N+2):
  D[i] = D[i-1] + L[i-1]
  if D[i] > X:
    break
  else:  
    cnt += 1
print(cnt)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,m = inpl()
a = [0] + inpl()
acc = itertools.accumulate(a)
res = 0
for i in acc:
    if i <= m:
        res += 1
print(res)

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))

ans = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        ans += 1
print(ans)

Solution (Python):
N,X=map(int,input().split())
L=list(map(int,input().split()))

count=0
dist=0
L.append(0)

i=0
while dist<=X and count<=N:
    dist+=L[count]
    count+=1
    

print(count)

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  



N, X = read_ints()
L = read_ints()
D = [0]
for l in L:
    D.append(D[-1] + l)
print(bisect_right(D, X))

Solution (Python):
n, x = map(int, input().split())
L = list(map(int, input().split()))

point = 0
ans = 1

for l in L:
    point += l
    if point > x:
        break
    ans += 1

print(ans)

Solution (Python):
N,X = map(int,input().split())
L = list(map(int,input().split()))
counter = 1
total = 0
for l in L:
    total+=l
    if(total <=X):counter+=1

print(counter)

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
m = 1
a = 0
for i in l:
    a+=i
    if a<=x:
        m+=1
print(m)

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, X = lr()
L = lr()
cnt = 1
cur = 0
for l in L:   
    cur += l
    if cur > X:
        break
    cnt += 1

answer = cnt
print(answer)

Solution (Python):
n, x = map(int, input().split())
L = list(map(int, input().split()))
dis = 0
bound = 1

for i in range(n):
    dis += L[i]
    if dis <= x:
        bound += 1
    else:
        break

print(bound)

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=1
d=0
for i in range(n):
    d+=l[i]
    if d<=x:
        ans+=1
print(ans)

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
y = 0
ans = 1
for i in range(n):
    y += l[i]
    if x >= y:
        ans += 1
    else:
        break
print(ans)

Solution (Python):
def solve():
    N,X = map(int,input().split())
    L = list(map(int, input().split()))
    D = 0
    count = 1
    for i in range(N):
        D += L[i]
        count += 1 if D <= X else 0

    print(count)

if __name__ == '__main__':
    solve()

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

from itertools import groupby, accumulate, product, permutations, combinations
def solve(N,X,L):
    L = accumulate(L)
    ans = 1
    for i,l in enumerate(L):
        if l>X:
            ans += i
            break
    else:
        ans += N
    return ans
print(solve(N,X,L))

Solution (Python):
n,x=map(int,input().split())
l=[0]+list(map(int,input().split()))
from itertools import accumulate
d=list(accumulate(l))


ans=0
for dd in d:
  if dd<=x:
    ans+=1
print(ans)

Solution (Python):
n,x = map(int, input().split())
l = list(map(int,input().split()))
d = [0]
for i in range(n):
    d.append(d[i]+l[i])
print(sum([j <= x for j in d]))

Solution (Python):
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=a[i]
  if ans>m:
    break
if ans<=m:
  print(n+1)
else:
  print(i+1)

Solution (Python):
a,b=map(int,input().split())
list=list(map(int,input().split()))
 
count=0
count2=1
for i in range(a):
  count+=list[i]
  if count<=b:
    count2+=1
    
print(count2)

Solution (Python):
n,x = map(int,input().split())
li = list(map(int,input().split()))
cnt = 0
num = 1
for i in li:
    if cnt + i > x:
        break
    else:
        cnt += i
        num += 1
print(num)

Solution (Python):
N,X=map(int, input().split())
L=list(map(int, input().split()))
ans=1
now=0
for l in L:
    now+=l
    if now<=X:
        ans+=1
print(ans)

Solution (Python):
N,X = map(int,input().split())
L = list(map(int,input().split()))
L.insert(0,0)
D = [0 for _ in range(N+2)]
cnt = 1
for i in range(2,N+2):
    D[i] = D[i-1]+L[i-1]
    if D[i]<=X:
        cnt += 1
    else:
        break
print(cnt)

Solution (Python):
n,x = map(int, input().split())
L = list(map(int, input().split()))
l = [0] * (n+1)
for i in range(1,n+1):
    l[i] = l[i-1] + L[i-1]
ans = 0
for a in l:
    if a <= x: ans += 1
print(ans)

Solution (Python):
def resolve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))

    bound = [0]
    for i in range(1, n+1):
        bound.append(l[i-1]+bound[i-1])
    ans = 0
    for i in range(n+1):
        if bound[i] <= x:
            ans += 1
    print(ans)
resolve()

Solution (Python):
n,k=map(int, input().split())
A=[int(i) for i in input().split()]
a = 0
ans = 1

for i in A:
    a+=i
    if a<=k:ans+=1

print(ans)

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    N,X=map(int,readline().split())
    L=list(map(int,readline().split()))

    S=[0]*(N+1)
    for i in range(1,N+1):
        S[i]+=S[i-1]+L[i-1]
    res=0
    for i in range(N+1):
        if S[i]<=X:
            res+=1
        else:
            break
    print(res)
if __name__=="__main__":
    main()

Solution (Python):
import numpy as np
N, X = map(int, input().split())
L = list(map(int, input().split()))

lc = np.cumsum(L, dtype=np.int32)

res = 1
for i in range(N):
    if lc[i] <= X:
        res += 1
print(res)

Solution (Python):
def main():
    n, x = map(int, input().split())
    L = list(map(int, input().split()))
    cnt = 1
    tmp = 0
    for i in range(len(L)):
        tmp += L[i]
        if tmp <= x:
            cnt += 1
        else:
            break
    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

tmp = 0
count = 0
for l in L:
    if tmp <= X:
        count += 1
    tmp += l

if tmp <= X:
    count += 1

print (count)

Solution (Python):
def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = accumulate([0] + L)
    ans = 0
    for s in S:
        if s <= X:
            ans += 1
        else:
            break
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def resolve():
  n, x = map(int, input().split())
  l = list(map(int, input().split()))
  ans = 1
  d = 0
  for i in l:
    d = d + i
    if d <= x:
      ans += 1
    else:
      break

  print(ans)
  return

if __name__ == "__main__":
  resolve()

Solution (Python):
n, x = map(int,input().split())
l = list(map(int,input().split()))

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

Solution (Python):
import sys
input = sys.stdin.readline
N, X = map(int, input().split())
a = list(map(int, input().split()))
t = 0
res = 1
for x in a:
  t += x
  if t > X: break
  res += 1
print(res)

Solution (Python):
import sys
import os
import math
import bisect

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, X = il()
    L = il()
    ret = 1
    di = 0
    for l in L:
        di += l
        if di <= X:
            ret += 1
        else:
            break
    print(ret)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 







n, x = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
now = 0
d = []
d.append(0)
for i in range(len(a)):
    d.append(d[i] + a[i])
for k in d:
    if k <= x:
        ans += 1
print(ans)

Solution (Python):
a,b=map(int,input().split())
list=list(map(int,input().split()))

count=0
count2=1
for i in range(a):
  count+=list[i]
  if count<=b:
    count2+=1
    
print(count2)

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = [0]*(n+1)
for i in range(n):
    d[i+1] = d[i] + l[i]
count = 0
for i in range(n+1):
    if x >= d[i]:
        count += 1
print(count)

Solution (Python):
N, X = map(int, input().split())

L = list(map(int, input().split()))

cnt = 1
d = 0

for l in L:
  d += l
  if d > X:
    break
  cnt += 1

print(cnt)

Solution (Python):
[N, X] = list(map(int,input().split()))
L = list(map(int,input().split()))

D=[0]
for i in range(N):
    bound = D[-1] + L[i]
    if bound>X:
        break
    D.append(bound)

print(len(D))

Solution (Python):
n, x = list(map(int, input().split()))
l = list(map(int, input().split()))
d = 0
ans = 1

for num in range(n) :
    d = d + l[num]
    
    if d <= x:
        ans += 1
    else:
        break
print(ans)

Solution (Python):

N, X = map(int, input().split())
L = list(map(int, input().split()))


def cumsum(xs):
    result = [xs[0]]
    for x in xs[1:]:
        result.append(result[-1] + x)
    return result


count = 1
cs = cumsum(L)
for i in cs:
    if X >= i:
        count += 1
print(count)

Solution (Python):

n,x=map(int, input().split())
l = list(map(int, input().split()))
d = 0
c = 1
for i in l:
    d += i
    if d > x:
        break
    c += 1
print(c)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

d = 0
cnt = 0
while d <= X:
    cnt += 1
    if cnt == N + 1:
        break
    d += L[cnt-1]
print(cnt)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
ans = 1
pd = 0
for l in L:
    d = pd + l
    pd = d
    if d <= X:
        ans += 1
    else:
        break
print(ans)

Solution (Python):
n,x = map(int,input().split())
a = list(input().split())
ans = 1
t = 0
for num in a:
  s = int(num)
  t += s
  if t <= x:
    ans += 1
  else:
    break
print(ans)

Solution (Python):
def q2():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]

    D = [0]
    for i in range(1, N+1):
        D.append(D[i-1] + L[i-1])

    ans = 0
    for d in D:
        if d <= X:
            ans += 1

    print(ans)


if __name__ == '__main__':
    q2()

Solution (Python):
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = [0]
for i in range(N):
    D.append(D[-1] + L[i])
ans = 0
for d in D:
    if d <= X:
        ans += 1
print(ans)

Solution (Python):
import sys

n,x = map(int, input().split())
l = list(map(int, input().split()))
sum = 0

for i in range(n):
    sum += l[i]
    if sum > x:
        print(i+1)
        sys.exit()
print(n+1)

Solution (Python):
N,X=map(int, input().split())
L=list(map(int, input().split()))
L.append(0)


d = 0
count = 0



for i in range(1, N+2):
  if d <= X:
    count = count + 1
    d = d + L[i-1]

print(count)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

x = 0
for i in range(N + 1):
    if i == 0:
        x = 0
    else:
        x += L[i - 1]
        if x > X:
            ans = i
            break
        elif i == N:
            ans = N + 1

print(ans)

Solution (Python):


import sys











from itertools import accumulate             







def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    n, x = mi()
    L = lmi()
    a = accumulate(L)
    print(len(list(filter(lambda num: num<=x, a))) + 1)

if __name__ == "__main__":
    main()

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
cnt = 1
for i in range(1,n+1):
  d += l[i-1]
  if x >= d:
    cnt += 1

print(cnt)

Solution (Python):
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=a[i]
  if ans>m:
    break
if ans<=m:
  print(n+1)
else:
  print(i+1)

Solution (Python):
n,x = map(int,input().split())
l_list = list(map(int,input().split()))
count = 1
d = 0
for i in range(n):
  d += l_list[i]
  if d <= x:
    count+= 1
  else:
    break
    
print(count)

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
d , count = 0 , 0

for i in range(0,n):
    d += l[i]
    
    if d<=x:
        count+=1
print(count+1)

Solution (Python):
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

pos = 0
ans = 1
for i in range(N):
    pos += L[i]
    if pos <= X:
        ans += 1
print(ans)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

ans = 1
bound = 0

for l in L:
    bound += l
    if bound > X:
        break
    ans += 1

print(ans)

Solution (Python):
n, x = [int(i) for i in input().split()]
l_list = [int(i) for i in input().split()]

ans = 1
d = 0
for l in l_list:
    d += l
    if d > x:
        break
    ans += 1
print(ans)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

p = 0
i = 0
ans = 1

for i in range(N):
    p += L[i]
    if p > X:
        break
    ans += 1


print(ans)

Solution (Python):
n, x=map(int,input().split())
l=list(map(int, input().split()))
ans=1
cnt=0
for i in range(n):
    cnt+=l[i]
    if cnt > x:
        break
    else:
        ans+=1
    
print(ans)

Solution (Python):
s = input().split(" ")
n = int(s[0])
x = int(s[1])
L = [0] + list(map(int, input().split(" ")))
dist = 0
ans = 0
for i in range(n+1):
    dist = dist + L[i]
    if dist <= x:
        ans += 1
    else:
        break

print(ans)

Solution (Python):
n, x = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
d = 0
for i in range(len(L)):
    d += L[i]
    if d > x:
        break
    cnt += 1

print(cnt)

Solution (Python):
n,x = list(map(int,input().split()))
l = list(map(int,input().split()))
l.insert(0,0)
r = 0
n_l = []
for i in l:
    r += i
    n_l.append(r)

ans = 0
for i in n_l:
    if i <= x:
        ans += 1

print(ans)

Solution (Python):
n,x = map(int,input().split())
L = list(map(int,input().split()))
ans = 1
l = 0

for i in range(n):
    l += L[i]
    if l <= x:
        ans += 1
        
print(ans)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = L[:]
for i in range(N-1):
  D[i+1] += D[i]
cnt = 0
for i in range(N):
  if D[i] <= X:
    cnt += 1
  else:
    break

print(cnt+1)

Solution (Python):
def ll():
    return list(map(int,input().split()))
def l():
    return int(input())
n,x = ll()
l = ll()
d = 0
count=0
for i in range(n):
    d +=l[i]
    if d<=x:
        count+=1
print(count+1)

Solution (Python):
n,x=map(int, input().split()) 
l= list(map(int, input().split())) 
sum=0
cnt=1
for i in range(len(l)):
    if sum<x:
        sum+=l[i]
        cnt+=1
    else:
        break
if sum>x:
    print(cnt-1)
else:
    print(cnt)

Solution (Python):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
b = 0
c = 1
for i in range(n):
    if b + l[i] <= x:
        b += l[i]
        c += 1
    else:
        break
print(c)

Solution (Python):
N,L=map(int,input().split())
A=list(map(int,input().split()))
hane=1
count=0
for i in range(N):
    count+=A[i]
    hane+=1
    if count==L:
        break
    elif count>L:
        hane-=1
        break

print(hane)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
ans = 1
d = 0
for i in range(N):
  d += L[i]
  if d <= X:
    ans += 1
print(ans)

Solution (Python):

n,x = map(int,input().split())
l = list(map(int,input().split()))
count = 0
d = [0]

for i in range(1,len(l)+1):
    d.append(l[i-1]+d[i-1])

for i in range(len(d)):
    if d[i] <= x:
        count += 1

print(count)

Solution (Python):
def resolve():
    n,x=map(int, input().split())
    l=list(map(int, input().split()))
    num=1
    zahyou=0
    for i in range(n):
        zahyou+=l[i]
        if zahyou<=x:
            num+=1
    print(num)
resolve()

Solution (Python):
N, X = map(int, input().split())
Llist = [int(i) for i in input().split()] 
Dlist = []

for i in range(N+1):
  if i == 0:
    Dlist.append(0)
  else:
    Dlist.append(Dlist[i-1]+Llist[i-1])


print(len([i for i in Dlist if i <= X]))

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""
import numpy as np


N, X = map(int, input().split())
L = np.array(list(map(int, input().split())))
L = np.append(0, L)

l_cum = np.cumsum(L)
print(sum(l_cum <= X))

Solution (Python):
N, X = map(int, input().split())
Ls = list(map(int, input().split()))

ans = 1
D = 0
for L in Ls:
    D += L
    ans += D <= X

print(ans)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    n,x = map(int, input().split())
    l = list(map(int, input().split()))
    res = 1
    c = 0
    for i in range(n):
        c += l[i]
        if c <= x:
            res += 1
    print(res)

if __name__ == '__main__':
    main()

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
for i in range(n-1): l[i+1] += l[i]
ans = 1
for i in range(n):
  if l[i] <= x: ans += 1
print(ans)

Solution (Python):
import bisect
n, x = list(map(int, input().split()))
L = list(map(int, input().split()))
D = [0]
for l in L:
    D.append(D[-1]+l)
i = bisect.bisect_right(D, x)
print(i)

Solution (Python):
n,x=map(int,input().split())
li=list(map(int,input().split()))
s=[0]
a=0
for i in li:
  a+=i
  s.append(a)
l=[i for i in s if i<=x]
print(len(l))

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
ans = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        ans += 1
print(ans)

Solution (Python):

N, X = map(int, input().split())
L = [int(s) for s in input().split()]

D = [0]

for i in range(N):
    D.append(D[i] + L[i])

print(len([d for d in D if d <= X]))

Solution (Python):
N,X= map(int, input().split())
L=list(map(int, input().split()))
D, ans=0, 0
for i in range(N):
    if D<=X:
        ans+=1
        D+=L[i]
    else:
        break
if D<=X:
    ans+=1
print(ans)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))

length = 0
ans = 0

for a in L:
    length += a
    if length > X:
        length -= a
        break
    ans += 1

print(ans+1)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, X = MAP()
L = LIST()

cnt = 1
D = 0
for i in range(N):
	D += L[i]
	if D <= X:
		cnt += 1
	else:
		print(cnt)
		break
else:
	print(cnt)

Solution (Python):
n,x =map(int,input().split())
l = list(map(int,input().split()))
ans = 1
d = 0
for i in range(n):
     d += l[i]
     if d <= x:
          ans += 1
print(ans)

Solution (Python):
from itertools import accumulate
from bisect import bisect_right

n, x = map(int, input().split())
A = list(map(int, input().split()))
AA = list(accumulate([0] + A))
ans = bisect_right(AA, x)
print(ans)

Solution (Python):
n, x= input().split()
n, x= int(n), int(x)
lista=list(map(int, input().split()))
cont=1
sum=0

for i in range(n):
	sum+=lista[i]
	if sum <= x:
		cont+=1
print(cont)

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
l.insert(0,0)
d = 0
count = 0
for i in range(n+1):
    d += l[i]
    if d <= x:
        count += 1
print(count)

Solution (Python):
icase=0
if icase==0:
    n,x=map(int,input().split())
    l=list(map(int,input().split()))
    d=0
    for i in range(n):
        d=d+l[i]
        if d>x:
            print(i+1)
            break
    if d<=x:
        print(n+1)

Solution (Python):
n, x, *L = map(int, open(0).read().split())
D = [0] * (n+1)
for i in range(1, n+1):
  D[i] = D[i-1] + L[i-1]
print(sum(d <= x for d in D))

Solution (Python):
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0] * (n + 1)
ans = 1

for i in range(1, n + 1):
    D[i] = D[i - 1] + L[i - 1]

    if D[i] <= x:
        ans = ans + 1
    else:
        break

print(ans)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  N, X = map(int, readline().split())
  L = list(map(int, readline().split()))
  D = 0
  ans = 1
  for i in range(N):
    D += L[i]
    if D<=X:
      ans += 1
    else:
      break
  print(ans)
  
if __name__ == '__main__':
  main()

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
ans = 1
s = 0
for i in range(n):
    s += l[i]
    if s <= x:
        ans += 1
print(ans)

Solution (Python):
def main():
    N, X = map(int, input().split())
    L = [int(a) for a in input().split()]
    bound = 1
    D = 0
    for i in range(N):
        b = D + L[i]
        if b <= X:
            bound += 1
        D = b
    print(bound)
main()

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
count = 1
for i in range(n):
    d += l[i]
    if d <= x:
      count += 1
    else:
      print(count)
      exit()
print(count)

Solution (Python):
from itertools import accumulate, takewhile
N, X = map(int, input().split())
print(len(list(takewhile(lambda x: x <= X, accumulate(map(int, input().split()))))) + 1)

Solution (Python):
N,X=map(int,input().split())
L=list(map(int,input().split()))
d=0
cnt=1
for l in L:
    d+=l
    if d<=X: cnt+=1
print(cnt)

Solution (Python):
N,X=map(int,input().split())
L=list(map(int,input().split()))
l=0
cnt=1
for i in range(N):
    l+=L[i]
    if l<=X: cnt+=1
    else: break
print(cnt)

Solution (Python):
a, b = map(int, input().split())
l = list(map(int, input().split()[:a]))
res = 1
d = 0
res= [0]
for item in l:
    res.append(d + item)
    d += item
filtered_res = list(filter(lambda x: x <= b, res))
print(len(filtered_res))

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
ball = 1
bound = 0
for i in l:
    bound = bound + i
    if bound > x:
        break
    ball += 1
print(ball)

Solution (Python):
n,m=map(int,input().split())
array1=list(map(int,input().split()))
k=1
q=0
for i in range(n):
    q+=array1[i]
    if q<=m:
        k+=1
print(k)

Solution (Python):
def main():
    n, x = [int(z) for z in input().split()]
    l = [int(z) for z in input().split()]
    tam = len(l)
    d = 0
    for i in range(tam):
        d += l[i]
        if d > x:
            print(i + 1)
            break
    if d <= x:
        print(n+1)
main()

Solution (Python):
line = input()
n, x = [int(i) for i in line.split()]
line = input()
l = [int(j) for j in line.split()]
if n>1:
    coord=0
    s=2
    for k in range(len(l)-1):
        if l[k] + l[k+1] + coord <= x :
            s+=1
        coord = coord+l[k]

    print(s)
else:
    print("2")

Solution (Python):
i = input().split()

n,x = list(map(int, i))

l = input().split()

l = list(map(int, l))

c = 1

aux = 0

step = [0]

for i in range(len(l)):
    try:        
        if step[i] + l[i] <= x:
            step.append(step[i] + l[i])
    except:
        pass

print(len(step))

Solution (Python):
numeroA, numeroB = [],[]
contadorCoord = 0
contador=1
numerosSTRa = input().split(" ")
for p in numerosSTRa:
    numeroA.append(int(p))


numerosSRTB = input().split(" ")
for j in numerosSRTB:
    numeroB.append(int(j))

for i in numeroB:
    contadorCoord+=i
    if contadorCoord <= numeroA[1]:
        contador+=1
print(contador)

Solution (Python):
line1 = [int(n) for n in input().split()]
line2 = [int(n) for n in input().split()]
D = 0
res = 0
for i in range(line1[0]):
    if D <= int(line1[1]):
        res += 1
    else:
        break
    D = D + int(line2[i])
if D <= int(line1[1]):
    res += 1
print(res)

Solution (Python):
line = input()
X, Y = [int(n) for n in line.split()]


line = input()
numbers = [int(n) for n in line.split()]

predicted_value = 1
for num in numbers:
    if Y - num >= 0:
        predicted_value += 1
        Y -= num
    else:
        break

print(predicted_value)

Solution (Python):
n, x = [int(x) for x in input().split()]

ls = [int(x) for x in input().split()]

bounces = [0]
d = 0
for i in range(n):
    d = d + ls[i]
    bounces.append(d)

count = 0
for b in bounces:
    if b <= x:
        count += 1
print(count)

Solution (Python):
N,X = map(int,input().split())
L = list(map(int,input().split()))
tmp = 0
for i in range(N):
  tmp = tmp + L.pop(0)
  if(tmp == X):
    print(str(i + 2))
    exit()
  elif(tmp > X):
    print(str(i + 1))
    exit()
  else:
    pass
if(i + 1 == N):
  print(str(N + 1))

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = [0]*(n+1)
count = 1
for i in range(1,n+1):
  d[i] = d[i-1]+l[i-1]
  if d[i]<=x: count += 1
print(count)