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
k = 1
for i in range(n):
    d = d + l[i]
    if d <= x:
        k += 1

print(k)

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

pos = 0
for i in range(n):
  pos += l_list[i]
  if pos > x:
    break
if pos <= x:
  i += 1
print(str(i + 1))

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

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

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

sum_lst = list()
sum_lst.append(0)
for i in range(0, len(l)):
    sum_lst.append(sum_lst[i]+l[i])

cnt = 0
for i in range(0, len(sum_lst)):
    if sum_lst[i] <= X:
        cnt += 1
    else:
        break

print(cnt)

Solution (Python):
from itertools import accumulate as ac

n, x = map(int, input().split())
lst = list(map(int, input().split()))
lst_ac = list(ac(lst))
lst_ans = [0] + lst_ac


ans = 0
for a in lst_ans:
    if a > x:
        break
    ans += 1


print(ans)

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

Solution (Python):
_input1 = input()
_input2 = input()
N, X = tuple([int(a) for a in _input1.split(' ')])
l_list = [int(a) for a in _input2.split(' ')]

length = 0
cnt = 0

for l in l_list:
    if length > X:
        break
    length += l
    cnt += 1

if length <= X:
    cnt += 1

print(cnt)

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

D = 0
count = 1
while len(L) > 0:
    D += L.pop(0)
    if D <= X:
        count += 1
    else:
        break

print(count)

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

D = 0
count = 1
for i in range(len(L)):
    D += L[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 = 0
cnt = 1
i = 0
while True:
    D = D + L[i]
    if D > X:break
    i += 1
    cnt += 1
    if i >= N:break
print(cnt)

Solution (Python):
from itertools import accumulate


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

ans = 1 + sum(acc <= X for acc in accumulate(L))


print(ans)

Solution (Python):
from itertools import accumulate


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

ans = sum(acc <= X for acc in accumulate(L)) + 1


print(ans)

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

cnt = 1
distance = 0

for bound in bounds:
  distance += bound
  if distance <= x:
    cnt += 1
  else:
    break
    
print(cnt)

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

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

ans = 1
pos = 0
for a in L:
    pos += a
    if pos > x:
        break
    ans += 1

print(ans)

Solution (Python):
x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i
  return i+1
y = makey(x1,x2)
print(y+1)

Solution (Python):
n,x=list(map(int,input().split()))
L=list(map(int,input().split()))
List=[]
d=0

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

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

print(cnt)

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

l = list(map(int, input().split()))
al = [0] * (n + 1)

count = 0
for i in range(0, n):
    al[i + 1] = al[i] + l[i]

for e in al:
    if e <= x:
        count += 1
    else:
        break

print(count)

Solution (Python):
n, x = list(map(int, input().split(" ")))
l_list = list(map(int, input().split(" ")))
points = [0]
p = 0
for l in l_list:
  p += l
  points.append(p)
result = list(filter(lambda i : i <= x, points))
print (len(result))

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

Solution (Python):
n,x = map(int, input().split())
l = map(int, input().split())
count = 1
for li in l:
  x = x - li
  if x < 0:
    break
  else:
    count = count+1
print(count)

Solution (Python):
import re
import numpy as np
 
N, X = [int(i) for i in re.split(" ", input())]
Ls = [int(i) for i in re.split(" ", input())]
Ds = np.cumsum(Ls)
counts = np.sum(Ds <= X) + 1
print(counts)

Solution (Python):
factor_1, factor_2 = list(map(int, input().split()))

L = [i for i in input().split()]

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	if(D_pre <= factor_2):
		count += 1

print(count)

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

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

Solution (Python):

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

bound_position = 0
bound_num = 1
for L in Ls:
    bound_position += L
    if bound_position > X:
        break
    bound_num += 1

print(bound_num)

Solution (Python):
a,b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]

cur = 0
res = 1

for i in c:
    cur += i
    if cur <= b:
        res += 1
    else:
        break

print(res)

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

Solution (Python):

import sys





    
    




i = input()
lis = i.split()

N = int(lis[0])

X = int(lis[1])




i = input()
lis = i.split()

L = list()
for k in lis:
    
    L.append(int(k)) 



if N != len(L):
    print("跳ねる回数と跳ねる位置のリスト数が一致していません。")
    sys.exit()


D = list()


D.append(0)
for k in range(0,len(L)):
    D.append(D[k]+L[k]) 



n = sum(test <= X for test in D)  


print(n)

Solution (Python):


import sys
import copy

sys.setrecursionlimit(1000000)





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

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

print(ans)

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

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

print(num)

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

for i in L:
    D = D + i
    if D > X:
        break
    else:
        ans += 1

print(ans)

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

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

print(count)

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

bounds = 1
position = 0
for distance in L:
  position += distance
  if position <= X:
    bounds += 1
  else:
    break

print(bounds)

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

print(n)

Solution (Python):
import itertools
import bisect
n, x = map(int, input().split())
a = list(map(int, input().split()))
a = [0] + list(itertools.accumulate(a))
print(bisect.bisect_right(a, x))

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

Solution (Python):
time =2
list = [list(map(int, input().split())) for i in range(time)]
n, x = [i for i in list[0]]
cnt = 0
cur = 0
for i in range(n):
    if cur <= x:
        cnt += 1
    cur += list[1][i]
if cur <= x:
    cnt += 1

print(cnt)

Solution (Python):
time = 2
list = [list(map(int,input().split())) for i in range(time)] 
n, x = [i for i in list[0]]

y = [0]
n = 1
for i in range(len(list[1])):
    y.append(y[i] + list[1][i])
    if (y[i+1] > x):
        break
    n += 1


print(n)

Solution (Python):
from sys import stdin
n, x = [int(x) for x in stdin.readline().rstrip().split()]
l = [int(x) for x in stdin.readline().rstrip().split()]
res = 1
sumVal = 0
for i in l:
    sumVal += i
    if sumVal <= x:
        res += 1
print(res)

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

    D += l
    if D <= X:
        ans += 1
    else:
        break
print(ans)

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

s = 1
d = 0
for it in li:
  d += it
  if (d<=X):
    s+=1
print ( s )

Solution (Python):
num = [int(i) for i in input(). split()]
bound_num = [int(j) for j in input().split()]
bound_length = 0
count = 1

for i in range(len(bound_num)):
    bound_length += bound_num[i]
    if bound_length <= num[1]:
        count += 1

print(count)

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

cnt = 0
ans = 1

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

print(ans)

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

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

print(len(list(filter(lambda x: x <= X, D))))

Solution (Python):
indata1 = input().split()
indata1 = list(map(int,indata1))
indata2 = input().split()
indata2 = list(map(int,indata2))

arrD = [0]
arrL = indata2.copy()

for i in range(1,indata1[0]+1):
    arrD.append(arrD[i-1]+arrL[i-1])

cnt = 0
for d in arrD:
    if d <= indata1[1]:
        cnt += 1

print(cnt)

Solution (Python):
n,x=map(int,input().split())
list1=list(map(int,input().split()))
list2=[0]
b=1
for i in range(n):
  a = list1[i]+list2[i]
  if a<=x:
    b+=1
  list2.append(a)
print(b)

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

bound = [0]
for i in range(N):
    bound += [L[i] + bound[-1]]

counter = 0
for i in bound:
    if i <= X:
        counter += 1
    else:
        break
print(counter)

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

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

for i in d:
    if x < i:
        break
    count += 1

print(count)

Solution (Python):
N,X=list(map(int,input().strip().split(' ')))
L=list(map(int,input().strip().split(' ')))
index=0
Bounce=[0]
for i in range(len(L)):
    
        
    Bounce+=[L[i]+Bounce[-1]]
    
count=0
for x in Bounce:
    if x<=X:
        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 l:
 ans += 1
 d += i
 if d > x:
  print(ans)
  exit()
print(ans+1)

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

count = 0
sum = 0

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

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

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

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

L=list(map(lambda x:int(x), input().split()))

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

Solution (Python):
nx = map(int, raw_input().split())
l = map(int, raw_input().split())
 
n = nx[0]
x = nx[1]
 
d = 0
i = 1
 
while True:
    if d <= x:
        d += l[i-1]
        i += 1
    if d > x:
        print(i-1)
        break
    if i == n + 1:
      print(i)
      break

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:
        break
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(N):
    D.append(D[-1]+L[i])
    if D[-1] <= X:
        count += 1
print(count)

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

d = 0
count = 1
for a in ls:
    d += a
    if d <= x:
        count += 1

print(count)

Solution (Python):

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

for i, l in enumerate(L, 1):
    D += l
    if D > X:
        print(i)
        exit()
print(N+1)

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

L = [int(i) for i in input().split()]

boundCount = 1

D = 0

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

print(boundCount)

Solution (Python):
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

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

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

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

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

count = 0
for o in range(len(d)):
    if d[o]<=x:
        count+=1
    else:
        count+=0
print(count)

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

RES = []
ichi = 0
RES.append(ichi)
for i in LIST:
    ichi = ichi + i
    RES.append(ichi)

cnt = 0
for i in RES:
    if i <= X:
        cnt = cnt + 1

print(cnt)

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

RES = []
ichi = 0
RES.append(ichi)
for i in LIST:
    ichi = ichi + i
    RES.append(ichi)

cnt = 0
for i in RES:
    if i <= X:
        cnt = cnt + 1

print(cnt)

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

li_w = [0]

for num in li_l:
    li_w.append(li_w[-1] + num)

print(len(list(filter(lambda y: y <= x, li_w))))

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

RES = []
ichi = 0
RES.append(ichi)
for i in LIST:
    ichi = ichi + i
    RES.append(ichi)

cnt = 0
for i in RES:
    if i <= X:
        cnt = cnt + 1

print(cnt)

Solution (Python):
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("POSSIBLE")
    elif q == 0:print("IMPOSSIBLE")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def printrow(a):
    for i in a:
        print(i)
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


x,y= (int(i) for i in input().split())       









a = iprow()

dp = [0]
for i in range(1,x+1):
    dp.append(dp[i-1]+a[i-1])
s = 0
while dp[s] <= y and s<=x-1 :s+=1
if s == x and dp[s]<=y :s+=1
print(s)

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

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

print(count)

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

for l in L:
    now += l
    if now <= X:
        res += 1

print(res)

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

now = 0
res = 1
for l in L:
    now += l
    if now <= X:
        res += 1
    else:
        break
print(res)

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

Solution (Python):
n,k=map(int,input().split())
l=[int(s) for s in input().split()]
re=[0]
cnt=0
for i in range(len(l)):
  re.append(re[i]+l[i])
for i in range(len(re)):
  if re[i]<=k:
    cnt+=1
print(cnt)

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

L=[n]

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

first=0
jump=1
for i in L:
    D=first+i
    first=D
    if(D<=x):
        jump+=1

print(jump)

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

counter = 1
place = 0

for num in l:
    place += num
    if place > x:
        break
    counter += 1

print(counter)

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

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

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

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

Solution (Python):


import sys

N,X = 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)
        sys.exit()

print(N+1)

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

count = 1
d = 0
for i in range(N):
        da = d + int(l_list[i])
        d = da
        if da <= X:
                count +=1
        else:

                print(count)
                break
        if count == int(N) + 1:
                print(count)

Solution (Python):
n, x = [int(elem) for elem in input().split()]
ls = [int(elem) for elem in input().split()]
scores = [sum(ls[0:i]) for i in range(0, len(ls)+1)]

cnt = 0
for s in scores:
  if s <= x:
    cnt += 1
  else:
    break
print(cnt)

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

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

L =list(accumulate(l))
print(bisect_right(L,x)+1)

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

ans=0

def d(i):
    if i==1:
        return 0
    else:
        return d(i-1)+L[i-2]

for i in range(1,N+2):
    if d(i)>X:
        print(i-1)
        exit()

print(N+1)

Solution (Python):
inp_1 = input().split()
n = int(inp_1[0])
x = int(inp_1[1])
l_in = input().split()

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

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

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

result = 1

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

print(result)

Solution (Python):

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

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

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

t = 0
c = 0
for v in L:
    if t <= X:
        c += 1
        
    t += v
    
if t <= X:
    c += 1
    
print(c)

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

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

print(ans)

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

D = 0
count = 1

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

print(count)

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

Solution (Python):
n,x=map(int,input().split())
ls=list(map(int,input().split()))
c = 1
b = 0
for an in range(n):
    b+=ls[an]
    if b>x:
        break
    c+=1
print(c)

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

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

s = 0
for i,leng in enumerate(l):
    s += leng
    if x<s:
        print(i+1)
        break
else:
    print(n+1)

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

for i in L:
  if NOW + i <= X:
    NOW += i
    c += 1
  else:
    break
print(c)

Solution (Python):
import math
import sys







n, x = map(int, input().split())
d = list(map(int, input().split()))
r = s = 0

for i, p in enumerate(d):
    s += p
    if s > x:
        exit(print(i+1))
print(n+1)

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)
    break
  if D == X:
    print(i+2)
    break
  if D < X and i == N-1:
    print(i+2)
    break

Solution (Python):
[n,x]=[int(i) for i in input().split()]
l=[int(i) for i in input().split()]
sum=int(0)
count = int(0)

while count<n and sum+l[count]<=x:
    sum=sum+l[count]
    count=count+1

print(count+1)

Solution (Python):
nx = input().split(' ')
n = int(nx[0])+1
x = int(nx[1])

l = input().split(' ')
llen = len(l)
d = 0
bound = 0
for i in range(n):

  if d<=x :
    bound += 1
  if llen <= i:
    break
  d = d + int(l[i])

print(bound)

Solution (Python):



import sys
list=[]
for line in sys.stdin:
    list.append(line)

NandX=list[0].split()

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

L=list[1].split()
D=0
i=0

if N==1:
    print(1)
else:
    while D<=X and i<=N-1:
        D=D+int(L[i])
        i+=1
        
    if i==N and D<=X:
        print(N+1)
    else:
        print(i)

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

D=0
c=1

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

print(c)

Solution (Python):
a,b =map(int,raw_input().split())
c=[]
c=map(int,raw_input().split())
iti=0
count=1
for i in range(0,a):
    iti+=c[i]
    if iti > b:
        break
    else:
        count+=1
print(count)

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
data_list = [0]
result = []

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

for item in data_list:
    if item <= x:
        result.append(item)
print(len(result))

Solution (Python):
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):
        break
    count += 1

print(count)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
p = 0
t = 1
while True:
  for i in range(N):
    p += L[i]
    if p > X:
      break
    elif i == N - 1:
      t += 1
      break
    else:
      t += 1
  break
print(t)

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

Solution (Python):
n,x=map(int,input().split())
arr=list(map(int,input().split()))
curr=0
bounce=1
i=0
while(i<n and curr+arr[i]<=x):
	curr+=arr[i]
	bounce+=1
	i+=1
print(bounce)

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

Solution (Python):
n,x=map(int,input().split())
da=list(map(int,input().split()))
ans=1
po=0
for i in da:
  po+=i
  if po<=x:
    ans+=1
  else:
    break
print(ans)

Solution (Python):
a,b=input().split()
d=0
n=1
l=input().split( )
for p in range(int(a)):
  d+=int(l[p])
  if d<=int(b):
    n+=1
print(n)

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

for i in range(N):
  total+=L[i]
  if total>X:
    print(i+1)
    break
if total<=X:
  print(N+1)

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

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

for i in range(n):
    b_sum += l[i]
    if b_sum <= x:
        b_count += 1

print(b_count)

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

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

counter = 1
l_sum = 0
for i in range(int(n)):
    l_sum += int(l[i])
    if l_sum <= int(x):
        counter += 1
print(counter)

Solution (Python):
n,x = map(int,input().split())
li=list(map(int,input().split()))
ans=1
ky=0
for i in li:
    if ky <= x:
        ky=ky+i
        ans+=1

ans=ans-1
if ky<=x:
    ans=ans+1
print(ans)

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

Solution (Python):
import bisect
n,x=map(int,input().split())
L=list(map(int,input().split()))
a=[0]*(n+1)
for i in range(1,n+1):
    a[i]=a[i-1]+L[i-1]
for i in range(n+1):
    if x==a[i]:
        print(bisect.bisect_right(a,x))
        exit()
print(bisect.bisect_left(a,x))

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

Solution (Python):
N, X = map(int, input().split())
L = [int(i) for i in input().split()]
D = []
for i in range(N+1):
    if i == 0:
        D.append(0)
    else:
        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())
L_lst = list(map(int, input().split()))

ans = 1
total = 0
for l in L_lst:
  total += l
  if X >= total:
    ans += 1
  else:
    break
print(ans)

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

Solution (Python):
import sys
input=sys.stdin.readline
def main():
    n,x=map(int,input().split())
    l=list(map(int,input().split()))
    q=[0]*(n+1)
    for i in range(1,n+1):
        q[i]=q[i-1]+l[i-1]
    def bs(x):
        l=0 ; r=n
        while l<=r :
            m=(l+r)>>1
            if q[m] <= x :l=m+1
            else : r=m-1
        return l
    print(bs(x))
main()

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

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

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

ans,D=1,0

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

Solution (Python):
N,X=[int(x) for x in input().split(' ')]
arr=[int(x) for x in input().split(' ')]
temp=0
flag=0
for x in range(N):
  if arr[x]+temp>X:
    temp=x
    flag=1
    break
  else:
    temp+=arr[x]
if flag:
  print(temp+1)
else:
  print(N+1)

Solution (Python):

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

d_list = [0,]
s = 0
for l in l_list:
    s += l
    d_list.append(s)

for i,d in enumerate(d_list):

    if d>X:
        cnt = i
        break
    if i == N:
        cnt = i+1
        break

print(cnt)

Solution (Python):
from itertools import accumulate
from bisect import bisect
_, x = map(int, input().split())
print(1 + bisect(list(accumulate(map(int, input().split()))), x))

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

D = []
D.append(0)

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

n = sum(x <= X for x in D)
print(n)

Solution (Python):

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

d = 0
for i,l in enumerate(l_list):
    d += l

    if d > X:
        break

    if i == N-1:
        i += 1
    
print(i+1)

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

cor = 0
counter = 1
for i in range(N):
	cor += L[i]
	if cor > X:
		break
	else:
		counter += 1

print(counter)

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

for i in range(1,N+1):
  aaaa = D[i-1] + L[i-1]
  D.append(aaaa)
n = sum(x<=X for x in D)
print(n)

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

d = 0
k = 1

for _l in l:
	d += _l
	if d > x:
		break
	k += 1
	
print(k)

Solution (Python):
def main():
  _, x = map(int, input().split())
  s = list(map(int, input().split()))
  d = 0
  c = 1

  for v in s:
    d += v

    if d > x:
      break

    c += 1

  print(c)


if __name__ == '__main__':
  main()

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

cor = 0
counter = 1
for i in range(N):
	cor += L[i]
	if cor > X:
		break
	else:
		counter += 1
print(counter)