peterverebics/CodeNet_Python_118 huggingface dataset:
# ABC 130: B – Bounding
N, X = map(int, input().split())
L = [int(s) for s in input().split()]

counter = 0
bounding = 0

for l in L:
    if bounding > X:
        break
    
    counter += 1
    bounding += l

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

s = 1
d = 0
for i in range(n):
  d += l[i]
  s += 1
  if d > x:
    break
print(s)
n,x = map(int,input().split())
l = list(map(int,input().split()))
cnt = 1
b = 0
for i in range(n):
    b += l[i]
    if b <= x:
        cnt += 1
    else:
        print(cnt)
        exit()
N,X = map(int,input().split())
L = list(map(int,input().split()))
zahyou = 0
count = 0

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

d = 0
count = 0
i = 1
while d <= x:
    d = d + l[i - 1]
    count += 1
    if i <= n - 1:
        i += 1

print(count)
# coding: utf-8
import sys

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

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

answer = cnt
print(answer)
n,x = map(int,input().split())
l = list(map(int,input().split()))
ans = 1
for i in range(n):
  if x >= sum(l[:i]):
    ans += 1
print(ans)
n, x = map(int, input().split())
l = list(map(int, input().split()))
ans = 0
t = 0
for i in range(n):
    if t <= x:
        ans += 1
    t += l[i]
print(ans)
N, X = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
t = 0

for i in range(N):
  if t + L[i] <= X:
    cnt += 1
    t += L[i]
    
print(cnt)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
for i in range(2, N + 2):
    if D + L[i - 2] > X:
        print(i - 1)
        break
    D = D + L[i - 2]
n,k=map(int, input().split(' '))
a=list(map(int, input().split(' ')))
ans,s=0,0
for i in a:
  if s<=k:
    ans+=1
  s+=i
print(ans)
N, X = map(int, input().split())
L = list(map(int, input().split()))

ans = 1
bound = 0

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

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

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

print(count)
def main():
    n,x = map(int, input().split())
    num_list = list(map(int, input().split()))

    sum = 0
    ans = 1

    for i in range(n-1):
        sum += num_list[i]
        if sum <= x:
            ans += 1

    print(ans)

if __name__ == '__main__':
    main()
import math
import collections
import fractions
import itertools

def solve():
    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:
            break
    print(i+1)
    return 0

if __name__ == "__main__":
    solve()
n,x=map(int,input().split())
listl=list(map(int,input().split()))
sum=0
for k in range(2,n+1):
  while sum<=x:
    sum+=listl[k-2]
print(k-1)
N,X=map(int,input().split())
L=list(map(int,input().split()))
tmp=0
ans=0
for i in range(N):
	if tmp>X:
		print(ans)
		break
	else:
		tmp+=L[i]
		ans+=1
print(ans)
N,X=map(int, input().split())
L=list(map(int, input().split()))
count = 0
x=0
# X=6
while x <= X and count < N:
  x = x + L[count]
  count = count + 1
print(count)
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=0
a=0
for i in range(n):
    if a<=x:
        ans+=1
        a+=l[i]
    else:
        break
print(ans)
n,x = map(int,input().split())
l = list(map(int,input().split()))
bound = []
bound.append(0)

for i in range(1,n+1):
  tmp = bound[i-1] + l[i-1]
  bound.append(tmp)
bound.sort()
ans = 0
for i in range(0,n):
  if(bound[i] <= x):
    ans += 1
  else:
    break
print(ans)
n , x = map(int, input().split())
l = list(map(int, input().split()))


d = 0

count = 0


for i in range(n):
    d += l[i]
    count += 1
    if d > x:
        print(count)
        break
# coding: utf-8

def solve(X, Ls):
  c, s = 0, 0
  for L in Ls:
    if s > X:
      break
    s += L
    c += 1
  return c


if __name__ == '__main__':
  _, X = map(int, input().split())
  print(solve(X, map(int, input().split())))
N,X = map(int,input().split())
l = list(map(int,input().split()))

sum=0
for i in range(N-1):
    if sum>X:
        print(i)
        exit()
    sum += l[i]
n,x = map(int,input().split())
l = list(map(int,input().split()))
cur = ans = 0
while cur<=x and ans<n:
    ans += 1
    cur += l[ans-1]
print(ans)
N, X = map(int, input().split())
L_list = list(map(int, input().split()))

D = 0
count = 0
for L in L_list:
    if D > X:
        break
    count += 1
    D += L
print(count)
n,x = map(int,input().split())
l = list(map(int,input().split()))
ln = [0]*(n+1)
for i in range(n):
  ln[i+1] = ln[i] +l[i]
 

for i in range(n+1):
  if ln[i]>x:
    print(i)
    exit()
n, x = map(int, input().split())
l = list(map(int, input().split()))
result = 0
res = 0
for i in l:
    if(result > x):
        break
    result += i
    res+=1
print(res)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
count = 0
for i in range(N):
  if D <= X:
    count += 1
  D = D + L[i]
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))
z = 0
ans = 0
for i in range(N):
  z += L[i]
  if z > X:
    ans = i+1
    break
    
print(ans)
N,X=list(map(int,input().split()))
L=list(map(int,input().split()))

if X==0:
    print(0)
    exit()

D=[0]*N
for i in range(1,len(L)):
    D[i]=D[i-1]+L[i-1]
    if D[i]>X:
        print(i)
        exit()
print(i+1)
N,X=map(int, input().split())
L=list(map(int, input().split()))
distance = 0
count = 0
while distance <= X and count < N:
  distance = distance + L[count]
  count = count + 1
print(count)
f=lambda:map(int,input().split())
_,x=f();c=d=0
for i in f():
  c+=1;d+=i
  if d>x: break
print(c)
N,X=map(int,input().split())
L=list(map(int,input().split()))

count=0
dist=0

i=0
while dist<=X and i<=N-1:
    count+=1
    dist+=L[i]
    i+=1
    #print(dist)

print(count)
n,x = map(int,input().split())
b = list(map(int,input().split()))
cnt = 0
ans = 0
for i in b:
  if cnt <= x:
    ans += 1
    cnt += i
  else:
    break

print(ans)
n,x=map(int,input().split())
l=list(map(int,input().split()))
list=[0]
cnt=0
for i in l:
  i=i+list[cnt]
  list.append(i)
  cnt+=1

ans=0
for i in list:
  if i>=x:
    ans+=1
print(ans)
n,x=map(int, input().split())
l=list(map(int, input().split()))
c=0
b=0
if l[0]>x:
    print(1)
else:
    for i in range(n):
        if b<=x:
            b+=l[i]
            c+=1
        else:
            break
print(c)
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
d = 0
for i in b:
  d += i
  if d <= a[1]:
    c += 1
print(c)
a,b=input().split()
a=int(a)
b=int(b)
c=list(map(int,input().split()))
d=0
e=1
for i in range(a):
  while d<b:
    d=d+c[i]
    e=e+1
  print(e)
  break
a,b=input().split()
a=int(a)
b=int(b)
c=list(map(int,input().split()))
d=0
e=0
for i in range(a):
  while d<b:
    d=d+c[i]
    e=e+1
  print(e+1)
  break
n, x = map(int,input().split())
l = list(map(int, input().split()))
cnt = 0
d = [0]
for i in range(1, n):
    d.append(d[i-1] + l[i])
for i in range(n):
    if d[i] <= x:
        cnt +=1
print(cnt)
import sys
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    n,x = IL()
    l = list(IL())
    ans = 0
    cur = 0
    for rep in l:
        if x < cur: break
        ans += 1
        cur += rep
    print(ans)
    return

if __name__=='__main__':
    Main()
N, X = map(int, input().split())
L_list = list(map(int, input().split()))

# D = 0
# count = 0
# for L in L_list:
#     if D <= X:
#         count += 1
#     else:
#         break
#     D += L
# print(count)




D = 0
count = 0
for i in range(N):
    if D <= X:
        count += 1
    else:
        break
    D += L_list[i]
print(count)
N,X=map(int,input().split())
L=list(map(int,input().split()))
tmp=0
ans=0
for i in range(N):
	if tmp>X:
		print(ans)
		exit()
	else:
		tmp+=L[i]
		ans+=1
print(ans)
n, x = map(int, input().split())
L = list(map(int, input().split()))
dist = 0
res = 0
for i, l in enumerate(L, 1):
    dist += l
    if dist > x:
        print(i)
        exit()
n, x = map(int, input().split())
l = list(map(int, input().split()))

ans = 0
bound = 0
for i in l:
    bound += i
    ans += 1
    if bound > x:
        break

print(ans)
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    _, x = map(int, input().split())
    l = tuple(map(int, input().split()))

    d_sum = 0
    for i, j in enumerate(l):
        if d_sum > x:
            print(i)
            quit()
        d_sum += j
    else:
        print(i+1)

if __name__ == '__main__':
    main()
N, X = [int(i) for i in input().strip().split()]
L = [int(i) for i in input().strip().split()]

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

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

for i in L:
    D += i
    if D <= X:
        count += 1
print(count)
n,x = map(int,input().split())
l = list(map(int,input().split()))

sum = 0

for k in range(n):
        sum += l[k]
        if sum >= x:
            print(k+1)
            break
n,x = map(int,input().split())
l = list(map(int,input().split()))

d = 0
c = 1
for i in l:
    d += i
    if(c <= x):c += 1
    else:break
print(c)
n, x = map(int, input().split())
l = list(map(int, input().split()))
sum = 0
b = 1;
for i in range(n):
	sum = sum + l[i]
	if(sum > x):
		print(b)
	else:
		if(i == n-1):
			print(n+1)
		else:
			b=b+1
n,x = map(int,input().split())
l = list(map(int,input().split()))
p = 0
ans = 0
for l_ in l:
  if p > x:
    break
  p = p + l_
  ans += 1
print(ans)
n, x = map(int,input().split())
l = list(map(int,input().split()))

a = 0
for i in range(n):
    a = a + l[i]
    #print(a)
    if x == a:
        print(i+1+1)
        break
    elif x <= a:
        print(i+1)
        break
    else:
        continue
else:
    print(i+1)
N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
num = 1

while D <= N:
  D = D + L[num-1]
  if D >= X:
    print(num)
    break
  num += 1
else:
  print(N)
n,x=map(int,input().split())
a = list(map(int,input().split()))
p = 0
f = 0
for i in a:
    if f <= x:
        f += i
        p += 1
    else:
        break
print(p)
N, X = map(int, input().split())
L = list(map(int, input().split()))

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

print(ans)
# coding = SJIS
n, x = map(int, input().split())
lis = list(map(int, input().split()))
ans = 1
now = 0

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

tmp = 0
ans = 1
for i in range(n):
  tmp += l[i]
  if tmp > x:
    ans += i
    break
print(ans)
N, X = map(int, input().split())
L = list(map(int, input().split()))
count = 0
p = 0

for i in L:
  if p > X:
    break
  count += 1
  p += i

print(count)
# Di−1+Li−1(2≤i≤N+1)

# Di−1+Li−1(2≤i≤N+1) 
inputted = list(map(int, input().split()))
N = inputted[0]
X = inputted[1]
L = list(map(int, input().split()))

x = 0
number_of_bounds = 0
for _i, Li in enumerate(L):
    x += Li
    if x > X:
        number_of_bounds = _i + 1
        break
    
print(number_of_bounds)
n, x = map(int, input().split())
list = list(map(int, input().split()))

jump = 0
cnt = 0
for i in list:
    if cnt <= n and jump <= x:
        cnt += 1
        jump += i
    else:
        break

print(cnt)
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 i in range(len(d)):
    if d[i] <= x:
        ans += 1
    else:
        print(ans)
        exit()
n,x = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
bx = 0
for l in L:
  cnt += 1
  bx += l
  if bx == x:
    print(cnt)
    break
  elif bx > x:
    print(cnt - 1)
    break
n,x=map(int,input().split())
a=list(map(int,input().split()))
total=0
for i in range(n):
  if total>x:
    break
  total+=a[i]
if total==sum(a):
  print(n+1)
else:
  print(i+1)
N, X = map(int, input().split())
L = list(map(int, input().split()))

dist = 0
cnt = 0
for i in range(N):
  if dist <= X:
    dist += L[i]
    cnt += 1
  else:
    break;
    
print(cnt)
n,x = map(int,input().split())
li = list(map(int,input().split()))
d = 0
count = 0
for i in range(len(li)):
    if x >= d:
        count += 1
    else:
        break
    d += li[i]
print(count)
n,x = map(int,input().split())
l = list(map(int,input().split()))
s = 0
c = 0
for i in range(n):
    s += 1
    c += l[i]
    if c > x:
        break
print(s)
#b
n,x=map(int, input().split())
l = list(map(int, input().split()))
d = 0
c = 0
for i in l:
    d += i
    c += 1
    if d > x:
        break
print(c)
n, x = map(int,input().split())
l = list(map(int,input().split()))
i, d = 0, 0
while i<n and d < x:
    d += l[i]
    i += 1
print(n)
n,x = map(int,input().split())
L = list(map(int,input().split()))
D = 0
c = 0

for i in range(n):
	if D <= x:
		c += 1
	D += L[i]
print(c)
N, X=map(int, input().split())
Llist = list(map(int, input().split()))

position=0
cnt=1

for i in range(N):
    position+=Llist[i]
    if position < X:
        cnt+=1

print(cnt)
n,x=map(int,input().split())
l=list(map(int,input().split()))
k=0
for i in range(n):
    k += l[i]
    if k>x:
        print(i+1)
        exit()
    else:
        cnt=i
        continue
print(cnt+1)
N, X = map(int, input().split())
L = list(map(int, input().split()))
x = 0
ans = 0
for i in range(N):
    if x > X:
        break
    else:
        ans += 1
        x += L[i]
print(ans)
N, X = map(int, input().split())
l = list(map(int, input().split()))
d = 0
answer = 0
for i in range(N):
    if d <= X:
        answer += 1
        d += l[i]
    else:
        break
print(answer)
n,x=map(int,input().split())
Y = list(map(int,input().split()))
Z = [0]*n
a = 0
for i in range(n):
  a +=Y[i]
  Z[i]=a
import bisect
print(2+bisect.bisect_left(Z,x))
n,x = map(int,input().split())
l = list(map(int,input().split()))
wa = 0
d = [0]*(n+2)
d[1]=0
d.pop(0)
wa = 1
for i in range(2,n+1):
  d[i]=d[i-1]+l[i-2]
  if(d[i]>x):
    break
  wa+=1
print(wa)
import itertools
import math
import fractions
import functools
import copy

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

print(count)
n,x=map(int,input().split())
a=list(map(int,input().split()))
sum=0
ans=1
for i in range(n) :
    if sum + a[i] <= x :
        sum+=a[i]
        ans+=1
print(ans)
def ll():
    return list(map(int,input().split()))
def l():
    return int(input())
n,x = ll()
l = ll()
d = 0
count=0
for i in range(n):
    
    if d<=x:
        d +=l[i]
        count+=1
    else:break
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
for i in range(1,N+1):
    D += L[i-1]
    if D>X:
        print(i)
        exit()
N,X= map(int,input().split())
li = list(map(int,input().split()))
count = 0
li.append(0)
li2 = sorted(li)
for i in range(len(li2)):
    if li[i]+li[i-1]<=X:
        count +=1
    else:
        pass
print(count)
n, x = map(int, input().split())
l = list(map(int, input().split()))
Sum = 0
ans = 0
i = 0
while Sum <= x:
    Sum += l[i]
    i += 1
    ans += 1
    if i >= len(l):
        break

print(ans)
N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = 0
count = 0
for n in L:
    D += n
    count += 1
    if D > X:
        break
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
cnt = 1
for i in range(N):
  if D<= X:
    D += L[i]
    cnt += 1
  else:
    break
print(cnt)
n, x = map(int, input().split())
L = list(map(int, input().split()))
sum1 = 0
cnt = 1
for i in L:
  sum1 += i
  if sum1 <= x:
    cnt += 1
  else:
    print(cnt)
    exit()
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
cnt=1
for i in range(n):
  if d+l[i]<=x:
    d+=l[i]
    cnt+=1
print(cnt)
N,X = map(int, input().split())
L = list(map(int, input().split()))

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

arr=list(map(int,input().split()))
a=0
ans=0

for i in range(N):
    if a<=X:
        ans+=1
        a=a+arr[i]
    else:
        break

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

total = 0
ans = 0
for i in range( len( l )):
  total += l[ i ]
  if total >= x:
    ans = i
    break
print( i + 1 )
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
cnt = 0
for i in range(n+1):
	if x < d:
		print(cnt)
	if i <n:
		d += l[i]
		cnt += 1
#print(cnt)
s = input().split(" ")
n = int(s[0])
x = int(s[1])
L = list(map(int, input().split(" ")))
dist = 0
ans = 0
for i in range(n):
    if dist <= x:
        ans += 1
    else:
        break
    dist = dist + L[i]

print(ans)
N, X = map(int, input().split())
*L, = map(int, input().split())
ans = 0
d = 0
while ans < N and d <= X:
    d += L[ans]
    ans += 1
print(ans)
#128 b むずい
n,x=map(int,input().split())
l=list(map(int,input().split()))
z=0
ans=0
for i in range(n):
    z+=l[i]
    if z>x:
        ans=i+1
        break
print(ans)
n, x = map(int, input().split())
l = list(map(int, input().split()))

sum = 0
ans = 0
for i in range(n):
  sum += l[i]
  if sum>x:
    print(i+1)
    break
n,x=map(int,input().split())
l=list(int(i) for i in input().split())
s=[]
for i in range(len(l)+1):
  t=sum(l[:i])
  if t < x:
    s.append(t)
print(len(s))
n,x = map(int,input().split())
l = list(map(int,input().split()))
m = 0
a = 0
for i in range(n):
    a+=l[i]
    if a<=x:
        m+=1

print(m)
N,X=map(int,input().split())
length=list(map(int,input().split()))
ans=0
distance=[0]*(N+1)
for i in range(N):
    distance[i+1]=distance[i]+length[i]
    if distance[i]<=X: ans+=1
print(ans)
n, x = list(map(int, input().split()))
Ls = list(map(int, input().split()))

count = 1
check = 0
for i in range(n):
    check += i
    if check <= x:
        count += 1
    else:
        break
print(count)
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    ans = 0
    cumsum = [0] * (len(l) + 1)
    for i in range(len(l)):
        cumsum[i+1] = cumsum[i] + l[i]
    for i in cumsum:
        if i <= x:
            ans += 1
        else:
            print(ans)
            return
    
if __name__ == '__main__':
    main()
n, x = map(int,input().split())
l = list(map(int, input().split()))
cnt = 0
d = [0]
for i in range(1, n):
    d.append(d[i-1] + l[-1])
for i in range(n):
    if d[i] <= x:
        cnt +=1
print(cnt)
N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = 0
count = 1
for n in L:
    D += n
    count += 1
    if D > X or count > N + 1:
        break
print(count)
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, x = LI()
l = LI()
cnt = 1
d = 0
for i in range(n):
    print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break
print(cnt)
n,y=map(int,input().split())
lst=list(map(int,input().split())) 
lst=[0]+lst
cnt=0 
sum_lst=0 
for i in range(n+1): 
	cnt+=1 
	sum_lst+=lst[i]
	if sum_lst>=y: 
		print(cnt-1) 
		break
url = "https://atcoder.jp//contests/abc130/tasks/abc130_b"

def main():
    n,x = list(map(int, input().split()))
    lis = list(map(int, input().split()))
    count = 0
    pos = 0
    for l in lis:
        if pos > x:
            print(count) if count > 0 else print(1)
            exit()
        pos += l
        count += 1
    print(count+1)

if __name__ == '__main__':
    main()
import numpy as np

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

CS_L = np.cumsum(L).tolist()
ans = len([l for l in L if l <= x])
print(ans)
n,x=map(int,input().split())
l=list(map(int,input().split()))

d=0
cnt=1

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

print(cnt)
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]

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

    print(i)

if __name__ == "__main__":
    main()
n,x=map(int, input().split())
l=list(map(int,input().split()))
cnt=0
zahyou=0
while zahyou<=x and cnt<=n-1:
  zahyou+=l[cnt]
  cnt+=1
print(cnt)
N,X=map(int,input().split())
List = list(map(int, input().split()))
height = 0
res = 1
def checkF(k,x):
  if k>=x:
    return True
  else:
    return False
    
for i in range(N):
  if checkF(height,X):
    break
  height += List[i]
  res +=1
print(res)
N, X = map(int, input().split())
lstL = list(map(int, input().split()))

def calcBoundCount(rangex, lstL):
    d = 0
    for i in range(0, len(lstL)):
        d = d + lstL[i]
        if rangex < d:
            return i + 1

print(calcBoundCount(X, lstL))
n, x = map(int, input().split())
L = list(map(int, input().split()))

d, i = 0, 0
while d <= x and i < n:
    d += L[i]
    i += 1

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

print(count + 1)
N,X=map(int,input().split())
L=list(map(int,input().split()))
count=0
tmp=0
L.insert(0,0)
for i in range(N):
  tmp+=L[i]
  if tmp<=X:
    count+=1
print(count)
N,X = map(int,input().split())
L = list(map(int,input().split()))
count = 0
s = 0
for i in range(N):
    if s <= X:
        count += 1
    s += L[i]
print(count)
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
cnt = 0
for i in range(n):
	cnt += 1
	d += l[i]
	if x < d:
		print(cnt)
		exit()
exit()
n,x=map(int,input().split())
l=list(map(int,input().split()))
b=0
cnt=0
for i in l:
  b+=i
  cnt+=1
  if b>x:
    print(cnt)
    break
n,x=map(int,input().split())
*l,=map(int,input().split())
s=0
c=0
for i in range(n):
    s+=l[i]
    c+=1
    if s>x:
        break
print(c)
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)
        break
n,x=map(int,input().split())
l=[0]*n
l[:]=map(int,input().split())
d=0
for ii in range(n):
  d+=l[ii]
  if d>x:
    print(ii+1)
    exit()
n,x = map(int, input().split())
l = list(map(int, input().split()))

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

for i in range(1,n+1):
  tmp = bound[i-1] + l[i-1]
  bound.append(tmp)
#bound.sort()
ans = 0
for i in range(0,n):
  if(bound[i] <= x):
    ans += 1
  else:
    break
print(bound)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
count = 0
for i in range(0,N):
  if D>X:
    break
  else:
    count+=1
    D+=L[i]
print(count)
N,X=map(int,input().split())
*L,=map(int,input().split())

p=0
cnt=0
for i in L:
 if (X<p):break
 cnt+=1;p+=i
print(cnt)
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
d=[]
d.append(0)
if d[0]>x:
    print(1)
    exit()

for i in range(1,len(l)+1):
    d.append(d[i-1]+l[i-1])
    if d[i]>x:
        print(i)
        exit()
n,x = map(int,input().split())
l = list(map(int,input().split()))
a =[0]
ans = n+1
for i in range(n):
    s = a[i] + l[i]
    if s > x:
        ans = i+1
    a.append(s)
print(ans)