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

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

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

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

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

point = 0

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

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



sum = 0
for i in range(1,n+1):
  sum += ls[i-1]
  if sum > x:
    print(i)
    quit()
print(n+1)

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


g = 0
cnt = 1
for l in L:
    g += l
    if X < g:
        break
    cnt += 1

print(cnt)

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

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

for s in i:
	a+=s
	if a <= X:
		d+=1
        
print(d)

Solution (Python):
N,X=list(map(int,input().split()))
i=list(map(int,input().split()))
listD=[0]
d=0

for s in i:
	d=d+s
	if d <= X:
		listD.append(d)
        
print(len(listD))

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
cont=0
ans=1
for i in range(0,n):
    cont+=l[i]
    if x>=cont:
        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+1):
  if i >= 1 and i <= N:
    D.append(D[i-1]+L[i-1])
print(len([int(y) for y in D if int(y) <= X]))

Solution (Python):
N, X = map(int, input().split())
L = [int(x) for x in input().split()]
D = []
i = 0
while N+1:
  if i == 0:
    D.append(0)
  elif i<=N:
    D.append(D[i-1]+L[i-1])
  else:
    break
  i+=1
print(len([int(y) for y in D if int(y)<=X]))

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

zahyo = 0
count = 1

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

Solution (Python):
d=0
c=0

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

for j in range(len(l)):
    if d<=x:
        d+=int(l[j])
        c+=1 

if d <= x:
    print(n+1)
else:
    print(c)

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

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

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

Solution (Python):
alfa=input().split()
N=int(alfa[0])
X=int(alfa[1])

L=input().split()


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

if D<=X:
    print(count)

Solution (Python):
alfa=input().split()
N=int(alfa[0])
X=int(alfa[1])

L=input().split()


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

if D<=X:
    print(count)

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

line = list(input().split(" "))

total = 0
ans = 0
for i in range(n):
    if total > x:
        break
    else:
        total += int(line[i])
        ans += 1

if total <= x:
    print(n + 1)
else:
    print(ans)

Solution (Python):
def main():
    temp = map(int,raw_input().split())
    a = map(int,raw_input().split())
    n = 0
    cnt = 1
    for i in a:
        n = n + i
        if temp[1] >= n:
            cnt = cnt + 1
        else:
            break

    print(cnt)


if __name__ == "__main__":
    main()

Solution (Python):
n,x = map(int,input().split())
lm = list(map(int,input().split()))
ln = [0]
for a in range(len(lm)):
  ln.append(ln[a]+lm[a])
s = 0
for b in range(len(ln)):
  if ln[b] <= x:
    s += 1
print('{}'.format(s))

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=map(int,input().split())
l=list(map(int,input().split()))
r=0
count=1
for i in range(n):
    r+=l[i]
    if r<=x:
        count+=1
print(count)

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

pos = 0
cnt = 1

for l in L:
    pos += l
    if pos <= X:
        cnt += 1
    else:
        break
print(cnt)

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

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]

ans = sum(di <= x for di in d)
print(ans)

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

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

print(cc)

Solution (Python):
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

print(ans)

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

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

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

  
print(cnt)

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

Solution (Python):
N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+int(bounce[i]))
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)

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

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

print(count)

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

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

list2 = []
t,count = 0,0
for i in range(N):
    t += int(list1[i])
    list2.append(t)

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

print(int(count) + 1)

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

d = 0
i = 0
while(i < n):
    d = d + l[i]
    if d > x:
        break
    i += 1
print(i + 1)

Solution (Python):
a, b = map(int, input().split())
d = 0
e = 1
for i in list(map(int, input().split())):
    d += i
    if d > b:
        break
    e += 1
print(e)

Solution (Python):
N, X = map(int, input().split())
n = 0
ret = 1
for x in [int(x) for x in input().split()]:
    n += x
    if n > X:
        break
    ret += 1
print(ret)

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

pos = 0
cnt = 1

for l in L:
    pos += l
    if pos <= X:
        cnt += 1
    else:
        break
print(cnt)

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

Solution (Python):

n, x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 1
d = 0
for l_i in l:
    d += l_i
    cnt += (d <= x)
print(cnt)

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

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

D = [0]*(N+1)
for i in range(N):
    D[i+1] = D[i]+L_list[i]
import bisect
n = bisect.bisect_right(D, X)
print(n)

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

Solution (Python):

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

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

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

print(count)

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

length = 0
count = 1
for i in range(n):
  
  length += lis[i]
  if length <= x:
    count +=1
    
print(count)

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

length = 0
count = 1
for i in range(n):
  
  length += lis[i]
  if length <= x:
    count +=1
    
print(count)

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

I = 0
A = 1
for i in L:
  I+=i
  if I <= X:
    A += 1
print(A)

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

count=0
L=list(map(int,input().split()))
D=[0]

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

for i in D:
    if(X>=i):
        count=count+1
print(count)

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

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

Solution (Python):
import sys

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

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

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:
        ans += 1
print(ans)

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

for i in range(N+1):
  bound += bound_list[i]
  if bound <= X:
    count += 1

print(count)

Solution (Python):
a, b = map(int, input().split())
c = map(int, input().split())
p, count = 0, 1
for t in c:
  p = p + t
  if (p <= b):
    count = count + 1
print(count)

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

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

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

print(count)

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
B=sum(L)
count=1
if X>=B:
  print(len(L)+1)
else:
  i=0
  H=0
  while H<=X:
    H=H+L[i]
    i=i+1
  print(i)

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]
  if d[i+1] > x:
    print(i+1)
    d[n] = x + 1
    break
if d[n] <= x:
  print(n+1)

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

Solution (Python):
def solve():
    N, X = [int(s) for s in input().split() if s]
    L = [int(s) for s in input().split() if s]
    D = 0
    cnt = 0
    for l in L:
        
        D += l
        cnt += 1
        if D > X:
            return cnt
    return cnt+1

print(solve())

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

print(count)

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

ans = 1
D_i = 0
for i in L:
  D_i += i
  if D_i <= X:
    ans += 1

print(ans)

Solution (Python):


import numpy as np


def solv(x, l_):
    ok = np.add.accumulate(l_) <= x
    return np.count_nonzero(ok) + 1


if __name__ == '__main__':

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

    l_ = np.fromstring(input(), dtype=np.uint16, sep=' ')

    ans = solv(x, l_)

    print(ans)

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

c = 0

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

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

c = 0

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

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

Solution (Python):
n,m = map(int,input().split())
lis = list(map(int,input().split()))
ans = 1
now = 0
for num in lis:
  now += num
  if now > m:
    break
  else:
    ans += 1
print(ans)

Solution (Python):
goukei=0 
count=1

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

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

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

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

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
    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[-1] + L[i])

flag = True
for i in range(len(D)):
    if D[i] > X:
        print(i)
        flag = False
        break

if flag:
    print(N+1)

Solution (Python):



def main():
    n, x = map(int, input().split())
    lst = list(map(int,input().split()))
    lst = lst[:n]

    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))

    bound = 0

    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)


if __name__ == '__main__':
    main()

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

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

print(ans)

Solution (Python):
n, x = map(int, input().split())
a = list(map(int, input().split()))
L = []
d = 0
for i in range(n):
    d += a[i]
    L.append(d)

cnt = 0
for j in range(len(L)):
    if L[j] <= x:
        cnt+=1
    else:
        break

print(cnt+1)

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


if __name__ == "__main__":
    main()

Solution (Python):

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

lst_A = (input().split())

count = 1

dis = 0

for i in range(N):
    dis += int(lst_A[i])
    if dis <= X:
        count += 1

print(count)

Solution (Python):
import numpy as np
N,X=map(int,input().split())
L=list(map(int,input().split()))
       
L=np.array(L)
D=np.zeros(N+1)
s=1
for i in range (1,N+1):
    D[i]=D[i-1]+L[i-1]

    if D[i]<=X:
        s+=1
    else:
        break
       
print (s)

Solution (Python):


"""
Created on Tue Jun 25 12:46:40 2019

@author: YudNK
"""

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

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

p = [0]
last = 0
for dist in L:
    last = last + dist
    p.append(last)

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

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

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

ns=0
ans = 1

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

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

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

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

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]
  else:
    print(ans)
    exit()
if D<=X:
  ans+=1
  print(ans)
else:
  print(ans)

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

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

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

Solution (Python):
n, x = map(int, input().split())
line = input().split()
pos = [0]
for i in range(n):
	l = int(line[i])
	pos.append(pos[i]+l)

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

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

print(c)

Solution (Python):
N, X = map(int, input().split())
l_list = list(map(int, input().split()))
l_list = [0] + l_list
d = 0
for i, l in enumerate(l_list):
    if d + l > X:
        break
    d += l
if sum(l_list) <= X:
    i = N + 1
print(i)

Solution (Python):
import numpy as np

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

L = np.array(L)
D = np.zeros(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
  else:
    pass

print(count)

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

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

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

d = 0
count = 0

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

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

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

Solution (Python):


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

distance = 0
jump_number = 1
for l in L:
    distance += l
    if distance > X:
        break
    else:
        jump_number += 1

print(jump_number)

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

p = 0
cnt = 1

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

Solution (Python):


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

distance = 0
jump_number = 1
for l in L:
    distance += l
    if distance > X:
        break
    else:
        jump_number += 1

print(jump_number)

Solution (Python):
A, B = input().split()
C = input().split()
count = 1
step = 0
for i in range(int(A)):
  step += int(C[i])
  if step > int(B):
    break
  count += 1
print(count)

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

Solution (Python):
N,X=map(int,input().split())
L_list=(input().split())
Bound_list=[0]
for i in range(1,N+1):
  count=int(L_list[i-1])+int(Bound_list[i-1])
  Bound_list.append(count)
Answer_list=list(filter(lambda n:n<=X,Bound_list))
print(len(Answer_list))

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

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

print(ans)

Solution (Python):


def solve():
    N, X = map(int, input().split())
    L = [int(i) for i in input().split()]
    bound = 0
    count = 1
    for Li in L:
        bound += Li
        if bound <= X:
            count += 1
        else:
            break
    print(count)


if __name__ == '__main__':
    solve()

Solution (Python):
import sys

def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))

    cnt = 1
    D = 0
    for a in A:
        D += a
        if D > X:
            break
        cnt += 1

    return cnt


if __name__ == '__main__':
    print(main())

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

C=D=0
while C<N:
  D+=L[C]
  if D>X:
    break;
  C+=1
print(C+1)

Solution (Python):
import sys
input = sys.stdin.readline
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):
line = input().split()
N = int(line[0])
X = int(line[1])
line = [int(p) for p in input().split()]
pos = 0
count = 1
for i in range(len(line)):
  pos += line[i]
  if pos > X:
    break
  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 L:
    D=D+i
    if D>X:
        break
    cnt+=1
print(cnt)

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

cnt = 1
sum_ = 0

for i in list:
    sum_ += i
    if sum_ > X:
        break
    cnt += 1

print(cnt)

Solution (Python):
_,x=map(int,input().split())
l=list(map(int,input().split()))
tmp=0
for i,j in enumerate(l):
  tmp+=j
  if tmp>x:
    print(i+1)
    exit()
print(len(l)+1)

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

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

c = 1
dx = 0

for i in range(len(l)):
    dx += l[i]

    if dx > X:
        break
    c += 1


print(c)

Solution (Python):
s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d <= X:
  if a >= N:
    a = N+1
    break
  else:
    d += L[a]
    a += 1 

print(a)

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

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

ret = 0
Ds = []

for i in range(N+1):
  if i==0:
    Ds.append(0)
  else:
    Ds.append(Ds[-1]+Ls[i-1])
  if Ds[-1]<=X:
    ret += 1
    continue
print(ret)

Solution (Python):
def load_input_int():
    return map(int, input().split())
    
N, X = load_input_int()
Ls = load_input_int()

cur_position = 0
ret = None
for idx, l in enumerate(Ls):
    cur_position += l
    if cur_position > X:
        ret = idx + 1
        break
print(ret if ret is not None else N+1)

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

n = 1
d = 0
for i in arr:
    d += i
    if d > X:
        break
    n += 1
print(n)

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

Solution (Python):
num, max = (int(i) for i in input().split())
list = [int(i) for i in input().split()]

cnt = 0
ans = 1
for n in list:
    cnt = cnt + n
    if cnt <= max:
        ans = ans + 1

print(ans)

Solution (Python):
N, X_MAX=input().split()
L = input().split()
count_i = 1
X = 0

for L_n in L:
    X += int(L_n)
    if int(X_MAX) < X:
        break
    count_i += 1
print(count_i)

Solution (Python):


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

j = 1
jx = 0
for i in range(len(l)):
    jx += l[i]
    if jx > x:
        break
    j += 1

print(j)

Solution (Python):
def bounding(N: int, X: int, L: list)->int:
    D = [0] * (N+1)
    for i, l in enumerate(L):
        D[i+1] = D[i] + l

    l, r = 0, N+1
    while r-l > 1:
        m = (l+r)//2
        if D[m] <= X:
            l = m
        else:
            r = m

    return r


if __name__ == "__main__":
    N, X = map(int, input().split())
    L = [int(s) for s in input().split()]

    ans = bounding(N, X, L)
    print(ans)

Solution (Python):
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
i=0
p=0
while i<n:
    p=p+l[i]
    if p>x:
        break
    i+=1
print(i+1)

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

D = 0

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

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

Solution (Python):
import sys
N, X = (int(x) for x in input().split())
L = list(map(int, input().split()))

count = 0
ans = 0
for i in range(N+1):                                                                                                                                                                                        
    if count != 0:                                                                                                                                                                                          
        ans = ans + L[count - 1]                                                                                                                                                                            
    if ans > X:                                                                                                                                                                                             
        print(count)                                                                                                                                                                                        
        sys.exit()                                                                                                                                                                                          
                                                                                                                                                                                                            
    count += 1                                                                                                                                                                                              

print(N+1)

Solution (Python):
import numpy
N, X = map(int, input().split())
L_list = list(map(int, input().split()))
L_list.insert(0, 0)
res = numpy.cumsum(L_list)
res += [0]
result = len(res[res<=X])
print(result)

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

d0 = 0


D = []
D.append(d0)

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

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

print(ans)

Solution (Python):
import sys





argv=input()
argv1,argv2=argv.split(" ")

argv=input()
a=argv.split(" ")

n=int(argv1)
x=int(argv2)

aa=[]
for i in a:
    aa.append(int(i))

ai=0
count=1
for i in aa:
    ai+=i
    if ai<=x:
        count+=1


print(count)

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    l.insert(0, 0)

    num = 0
    sum = 0
    for e in l:
        if sum + e <= x:
            num += 1
            sum += e
        else:
            break

    print(num)

Solution (Python):


from sys import stdin
from collections import defaultdict

N, X = [int(x) for x in stdin.readline().rstrip().split()]
L = []
L = [int(x) for x in stdin.readline().rstrip().split()]

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

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

print(max+1)

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

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

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)