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):
inputNum = list(map(int, input().split()))
L = list(map(int, input().split()))

N = inputNum[0]
X = inputNum[1]

D = [0]

count = 1

for i, l in enumerate(L):
    
    D.append(D[i] + l)
    if(D[i+1] <= X):
        count += 1
    else:
        break

print(count)

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

D = [0]
for l in L:
    D.append(D[-1]+l)

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

print(ans)

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

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

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

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

D=[0, 0]
count=1
for n in range(N):
  D[1] = D[0] + L_i[n]
  if D[1] <= X:
    count += 1
    D[0] = D[1]
  else:
    break

print(count)

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

d = 0
for i, l in enumerate(ls):
    d += l
    if (d > x):
        print(i+1)
        exit()

print(len(ls)+1)

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

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

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

sum = 0
count = 1

for i in range(N):
  sum = sum + L[i]
  count += 1
  if sum > X:
    count -= 1
    break
  if sum >= X:
    break
print(count)

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 D <= x:
        cnt += 1
        continue
    else:
        break
print(cnt)

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

cnt=1
bound=0
for a in range(n):
    bound=bound+l_list[a]
    if bound<=x:
        cnt+=1
        continue
    else:
        break
print(cnt)

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

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

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

print(ans)

Solution (Python):
N, X =  [int(e) for e in input().split()]
lst = [int(e) for e in input().split()]
cnt = 0
for i in range(N+1):
  if i == 0:
    num = 0
  else:
    num = num + lst[i-1]
  if num <= X:
    cnt += 1
print(cnt)

Solution (Python):
N, X =map(int,input().split())
a = list(map(int,input().split()))
x = 0
count = 0
for i in range(len(a)+1):
    count += 1
    if not i == len(a):
        x += a[i]
    else:
        break
    if x > X:
        break
print(count)

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

Solution (Python):
n,x = map(int,input().split())
 
nums = list(map(int,input().split()))
 
s=0
count=1
for val in range(len(nums)):
    s = s+nums[val]
    if s <= x:
        count += 1
    
print(count)

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

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

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

Solution (Python):
def main():
    N,X = map(int,input().split())
    L = list(map(int, input().split()))
    D = 0
    count = 1

    for i in range(0,N):
        D = D + L[i]
        if D <= X:
            count = count + 1

    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
n,x=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
ans=1
curr=0
ind=0
while(curr<=x):
    if(ind>=n):
        break
    curr+=a[ind]
    ind+=1
    if(curr>x):
        break
    ans+=1
print(ans)

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

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

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

d = [0]*(n+1)
c = 1
for i in range(1,n+1):
    d[i] = d[i-1] + l[i-1]
    if d[i] <= x:
      c += 1
    else:
      break
      
    
print(c)

Solution (Python):
from sys import stdin


def main():
    N, X = [int(x) for x in stdin.readline().rstrip().split()]
    L_list = [int(x) for x in stdin.readline().rstrip().split()]

    count = 1
    D = 0

    for L in L_list:
        D = D + L
        if D <= X:
            count += 1
        else:
            break

    print(count)


if __name__ == "__main__":
    main()

Solution (Python):
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)
        exit()
print(N+1)

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

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

print(c)

Solution (Python):
n,x=map(int,input().split());c=0
for i in input().split():
  x-=int(i);c+=1
  if x<=0:c+=(x==0);break
  c+=(c==n)
print(min(n+1,c))

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

D = 0
ans = 1
for l in L:
    D += l
    if (D <= X):
        ans += 1
print(ans)

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

for i in range(N):
  L += A[i]
  if(L <= X): count += 1
  else: break

print(count)

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

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

print(res)

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

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

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

Solution (Python):

n, x = map(int, input().split(' '))
L = [int(el) for el in input().split(' ')]

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

Solution (Python):
i = input().split(" ")
n = int(i[0])
x = int(i[1])
l = input().split(" ")
height = 0
count = n+1

for i in range(n):
    if (height + int(l[i]) <= x):
        height += int(l[i])
    else:
        count = i + 1
        break

print(count)

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

D = 0
count = 1

for l in L:
    D += l

    if D <= X:
        count += 1

    else:
        break

print(count)

Solution (Python):
n,x = map(int,input().split())
li = list(map(int,input().split()))
an = 1
n1 = 0

for i in range(n):
    n1 += li[i]
    
    if n1 <= x:
        an += 1
    else:
        break

print(an)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
while len(L) != 0:
    if sum(L) <= X:
        print(len(L) + 1)
        exit()
    else:
        L.pop()

Solution (Python):
import sys
input = sys.stdin.readline

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

if __name__ == '__main__':
	main()

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

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

length = 0
ans = 0

for i in range(n+1):
    if length <= x:
        ans += 1
        if i != n:
            length += L[i]
    else:
        break

print(ans)

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

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

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

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

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

Solution (Python):
INPUT_SENTENCES = 2
ss = [input() for i in range(INPUT_SENTENCES)]
N = int(ss[0].split(" ")[0])
X = int(ss[0].split(" ")[1])
L = [int(i) for i in ss[1].split(" ")]
D = [0]
for i in range(1, N + 1):
    D.append(D[i-1] + L[i-1])
print(len([i for i in D if i <= X]))

Solution (Python):
N, X = map(int, input().split())
a = list(input().split())
a = [int(i) for i in a]
x = 0
bc = 1
for i in range(N):
        x += a[i]
        if x > X: break
        bc += 1
print(bc)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0 for i in range(N + 1)]
bounding = 0
for i in range(N):
    D[i + 1] = D[i] + L[i]

for d in D:
    if d <= X:
        bounding += 1

print(bounding)

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

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

print(ans)

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

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

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

height = 0
count = 1
for i in range(0, N):
    height += L[i]
    if height <= D:
        count += 1

print(count)

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

pf = [arr[0] for i in range(n)]

for i in range(1, n):
    pf[i] = pf[i-1] + arr[i]

c = 0
for i in pf:
    c += (i <= x)

print(c+1)

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

c_t = 1
now = 0

for count in range(n):
    now += lis[count]
    if now <= x:
        c_t += 1

print(c_t)

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

D = 0
ans = 1 if D <= X else 0
for item in inputs:
    D += item
    if D <= X:
        ans += 1

print(ans)

Solution (Python):
A = input()

A = A.split()

N = int(A[0])
X = int(A[1])

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

D = 0
count = 1
for i in range(N):
    D = L[i] + D
    if D <= X:
        count = count + 1

print(count)

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

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

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

count = 1
dist = 0
for l in l_l:
    dist += l
    if dist > x:
        break
    else:
        count += 1

print(count)

Solution (Python):
n, x = map(int, input().split())
L = [int(i) for i in input().rstrip().split()]
jmp = 0
cnt = 1

for j in range(0, n):
    if jmp+L[j] <= x:
        cnt += 1
    jmp = jmp + L[j]
    
print(cnt)

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

Solution (Python):
def main15():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    data2 = input().split()
    num2 = []
    for i in range(num[0]):
        num2.append(int(data2[i]))
    length = 0
    result = 1
    for i in range(num[0]):
        length = length + num2[i]
        if length > num[1]:
            break
        else:
            result = result + 1
    print(result)

if __name__ == "__main__":
    main15()

Solution (Python):
N = [int(i) for i in input().split()]
K = [int(i) for i in input().split()]
s = 0
c = 1
for i in K:
    s += i
    if s > N[1]:
        break
    else:
        c += 1
print(c)

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

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

count = 0
p = 0
for l in L:
    if p <= x:
        p += l
        count += 1
if p <= x:
    count += 1
print(count)

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

Solution (Python):
def B_Bounding():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    D = 0
    count = 1
    for bound in range(N):
        D = D + L[bound]
        if X >= D:
            count += 1
        else:
            break
    print(count)

if __name__ == "__main__":
    B_Bounding()

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

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

distance = 0
cnt = 1
for i in range(n):
    distance += l[i]
    if distance <= x:
        cnt += 1

print(cnt)

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

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

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

print(cnt)

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

d=[0]
for v in l:
    d.append(d[-1]+v)

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

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

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

ans = int(1)
t = int(0)
for i in range(n):
    t += int(L[i])
    if t <= x:
        ans += 1

print(ans)

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

for i in range(1, n+1):
    if d + l[i-1] <= x:
        d = d + l[i-1]
        count = count + 1
    else:
        print(count)
        sys.exit()
print(count)

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

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

print(ans)

Solution (Python):
N,X= [int(s) for s in input().split()]
lst = [int(s) for s in input().split()]
dist=0
count=0
while(count<N):
  dist=dist+lst[count]
  if(dist>X):
    break
  count=count+1
print(count+1)

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])

ans = 0
for a in d:
    if a <= x:
        ans += 1
    else:
        break

print(ans)

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

Solution (Python):
N, X = map(int,input().split())
L = list(map(int,input().split()))
i = 1
D = [0]
while i <= N and D[i-1] <= X:
  D += [D[i-1] + L[i-1]]
  i += 1
if D[i-1] > X:
  i -= 1
print(i)

Solution (Python):
n1, n2 = [int(i) for i in input().split()]

n3 = [int(j) for j in input().split()]

c4 = 1
n5 = 0

for i6 in range(n1):
    n5 += n3[i6]
    if n5 <= n2:
        c4 += 1
    else:
        break

print(c4)

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

now = 0
count = 1
for i in L_list:
    now += i
    if now <= X:
        
        count += 1

print(count)

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

d = []

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

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

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

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

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

Solution (Python):
n,Xmax=map(int,input().split())
L=list(map(int,input().split()))
x=0
count=1
while x+L[0]<=Xmax:
  count+=1
  x+=L.pop(0)
  if len(L)==0:
    break
print(count)

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

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

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

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

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

Solution (Python):

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

d = [0]


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




counter = 0

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

print(counter)

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

Solution (Python):

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

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

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

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

print(count)

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

cnt = 1
l = 0

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

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

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

print(ans)

Solution (Python):
_, X = map(int, input().split())
L = [int(i) for i in input().split()]
d = 0
for i, l in enumerate(L):
    d += l
    if d > X:
        break
if d > X: print(i+1)
else: print(i+2)

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

for i in range(N+1):
  value += L[i]
  if value <= X:
    bound += 1
    
print(bound)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
 
point = 0
cnt = 1
while cnt<=N:
  point += L[cnt-1]
  if point <= X:
    cnt += 1
  else:
    break
 
print(cnt)

Solution (Python):
n, x = list(map(int, input().split()))
li = list(map(int, input().split()))
d = []
d.append(0)
for l in li:
  d.append(d[-1] + l)
cnt = 0
for hoge in d:
  if(hoge <= x):
    cnt = cnt + 1
print(cnt)

Solution (Python):
N,X = map(int,input().split())
L = list(map(int,input().split()))
T = [0]*(N+1)
temp = 0
for i in range(1,N+1):

    T[i] = T[i-1] + L[i-1]
for i in T:
    if i <= X:

        temp+=1
print(temp)

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

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])

ans = [e for e in D if e <= X]


print(len(ans))

Solution (Python):

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
D = [0] * 200
count = 1

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

print(count)

Solution (Python):
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = 1
e = 0
for i in range(a):
    e += c[i]
    if e <= b:
        d += 1
    else:
        print(d)
        exit()
print(d)

Solution (Python):
import math
x =  [int(s) for s in input().split()]
jump = [int(s) for s in input().split()]
p = 0
sum = 1
for i in range(x[0]):
    p += jump[i]
    if(p <= x[1]):
        sum += 1
print(sum)

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def main():
    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)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
N, X = map(int,input().split())
ll = list(map(int,input().split()))
count = 1
D = 0
for i in ll:
    if D+i> X:
        print(count)
        exit()
    else:
        D += i
        count += 1
print(N + 1)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
	n, x = map(int, (input().strip().split()))
	l = list(map(int, input().strip().split()))
	pos = 0
	ans = 1
	for i in l:
		pos += i
		if pos > x:
			break
		ans += 1
	print(ans)

if __name__ == '__main__':
	main()

Solution (Python):


limit_num, limit_cor = tuple(int(i) for i in input().split(" "))
l_list = tuple(int(i) for i in input().split(" "))
dp = [0]


def jump_cor(n):
    if len(dp) < n + 1:
        dp.append(dp[n - 1] + l_list[n - 1])
    return dp[n]


for i in range(limit_num + 1):
    if jump_cor(i) > limit_cor:
        i -= 1
        break
print(i + 1)

Solution (Python):

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

main()

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

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

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

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

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

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

Solution (Python):
N, X = map(int,input().split())
Llists = list(map(int,input().split()))
dist = 0
for i,Llist in enumerate(Llists):
    dist += Llist
    if X < dist:
        print(i + 1)
        break
else:
    print(N + 1)

Solution (Python):
import numpy as np
N,X = map(int, input().split())
L = [int(z) for z in input().split()]

D =  np.zeros(N+1)
for i in range(N):
    D[1+i] = D[i] + L[i]

print(np.count_nonzero(D<=X))

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

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

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

r=1
p=0

for e in l:
    p+=e
    if p <= x:
        r+=1
    else:
        break

print(r)

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

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

for i in range(N):
  d+=L[i]
  if d<=X:
    a+=1
else:
  print(a)

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

Solution (Python):
n, x = map(int, input().split())
ls = list(map(int, input().split()))
ans = [0, ls[0]]

for i in range(1,len(ls)):
    if ans[i] + ls[i] <= x:
        ans.append(ans[i] + ls[i])
    else:
        break
print(len(ans))

Solution (Python):

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

ans = 1
tmpx = 0
for i in range(n):
    if tmpx + li[i] > x:
        break
    ans += 1
    tmpx += li[i]

print(ans)

Solution (Python):

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


l = list(map(int, input().split()))
l.insert(0, 0) 


distance = 0
result = 0

for d in l:
   if distance + d <= x:
       distance += d
       result += 1
   else:
       break
print(result)

Solution (Python):






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





count = 1
dis_sum = 0
for l in Ls:
    dis_sum += l
    if dis_sum > X:
        print(count)
        break
    count += 1
else:
    print(count)

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

zahyou = 0
num = 1

for i in range(N):
    if zahyou + L[i] <= X:
        zahyou = zahyou + L[i]
        num += 1
    else:

        break

print(num)

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

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

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

Solution (Python):
s=input().split()
n=int(s[0])
x=int(s[1])
j=[]
d=input().split()
for i in range(n):
    j.append(int(d[i]))
d= 0
i=0
p=0
while d<=x:
    p+=1
    if i<=len(j)-1:
        d+=j[i]
    else:
        break
    i+=1
print(p)

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

count = 1
v = 0
for i in range(len(l)):
    v += l[i]
    if v <= x:
        count += 1
print(count)

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

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

d = [0]
for i in range(n):
    value = l[i] + d[i]
    if value <= x:
        d.append(value)
    else:
        break
print(len(d))

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

def accmulate(array):
    global cs
    cs = [0]*(len(array)+1)
    for i in range(len(array)):
        cs[i+1] = cs[i] + array[i]

def query(l,r):
    return cs[r+1] - cs[l]

accmulate(L)

cnt = 0
for a in cs:
    if a <= X:
        cnt += 1

print(cnt)

Solution (Python):
def test():
    N, X = map(int, input().split())
    D = list(map(int, input().split()))
    d = 0
    for i in range(N):
        d += D[i]
        if d > X:
            print(i+1)
            return
    print(N+1)
    

if __name__ == '__main__':
    test()

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

Solution (Python):
import numpy as np

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

L_res = np.cumsum(np.array(L))
print(L_res[L_res <= X].shape[0]+1)

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

D = 0
i = 1
for l in L:
    D += l
    if D > X:
        break
    i += 1
print(i)