peterverebics/CodeNet_Python_118 huggingface dataset:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = []
for i in range(N+1):
  if i == 0:
    D.append(0)
  else:
    D.append(D[i-1]+L[i-1])
count = [1 for i in D if i <= X]
print(len(count))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    N, X = list(map(int,readline().split()))
    L = map(int,readline().split())
    sum = 0
    cnt = 1
    for l in L:
        sum += l
        if sum <= X:
            cnt += 1
    print(cnt)

    return

if __name__ == '__main__':
    main()
n,x = map(int,input().split())
l = list(map(int,input().split()))
cur = ans = 0
for i in range(n):
    cur += l[i]
    if cur<=x:
        ans += 1
print(ans+1)
k, n = list(map(int, input().split(' ')))
l = list(map(int, input().split(' ')))
ct = 0
ans = 1
i = 0
while ct <= n and i < len(l):
  ct += l[i]
  ans += (ct <= n)
  i += 1
print(ans)
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:
        ans += 1
        now += L[i]
    else:
        break
print(ans)
N, X = map(int, input().split())
L = list(map(int, input().split()))

from itertools import groupby, accumulate, product, permutations, combinations
def solve(N,X,L):
    L = accumulate(L)
    ans = 1
    for i,l in enumerate(L):
        if l>X:
            ans += i
            break
    else:
        ans += N
    return ans
print(solve(N,X,L))
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
a=0
for i in range(n):
  a+=l[i]
#  print('i:',i,'a:',a)
  if a>x:break
if x<a:print(i+1)
else:print(i+2)
n, x = map(int, input().split())
L = list(map(int, input().split()))
dis = 0
bound = 1

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

print(bound)
line1 = [int(n) for n in input().split()]
line2 = [int(n) for n in input().split()]
D = 0
res = 0
for i in range(line1[0]):
    if D <= int(line1[1]):
        res += 1
    else:
        break
    D = D + int(line2[i])
if D <= int(line1[1]):
    res += 1
print(res)
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N, X = input_nums()
    L = input_nums()
    s = 0
    cnt = 1
    for i in range(N):
        s += L[i]
        if s <= X: cnt += 1
    print(cnt)

if __name__ == '__main__':
    main()
N,X = map(int,input().split())
L = list(map(int,input().split()))
Z = 0
cnt = 1
for i in range(N):
    Z += L[i]
    if Z <= X:
        cnt += 1
    else:
        break
print(cnt)
N, X = map(int, input().split())
l = list(map(int, input().split()))
l.insert(0, 0)
val, count = 0, 0
for i in l:
    val += i
    if val <= X:
        count += 1
    else:
        break
print(count)
n, x = map(int, input().split())
list = list(map(int, input().split()))
count, now = 1, 0
for i in range(n):
	now += list[i]
	if now > x:
		break
	count += 1
print(count)
n, x = map(int, input().split())
l = list(map(int, input().split()))
count, sum = 1, 0
for i in range(n):
    sum += l[i]
    if sum <= x:
        count += 1
    else:
        break
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
num = 1
for i in range(len(L)):
  D = D + L[i]
  if D <= X:
    num += 1
  else:
    break
print(num)
a,b = list(map(int,input().split()))
d = list(map(int,input().split()))
c = 0
count = 1
for i in range(a):
    c += d[i]
    if c <= b:
        count += 1
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))

# 累積和 cumulative sum
ans = 0
cumul = [0]
for i, l in enumerate(L):
  d = cumul[-1] + l
  if d > X:
    #print(i, d)
    ans = i + 1
    break
  cumul.append(d)
else:
  ans = N + 1

#print(cumul)
print(ans)
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:
        break
 
print(ans)
n,x = map(int, input().split())
l = list(map(int,input().split()))
d = [0]
for i in range(n):
    d.append(d[i]+l[i])
print(sum([j <= x for j in d]))
n, x = map(int, input().split())
#print("n:%d" %n)
#print("x:%d" %x)
l = list(map(int, input().split()))
sum = 0
b = 1;
for i in range(n):
	sum = sum + l[i]
	if(sum > x):
		print(b)
		break
	else:
		if(i == n-1):
			print(n+1)
			break
		else:
			b=b+1
N,X=map(int,input().split())
L=list(map(int,input().split()))
x=0
ans=1
for l in L:
  x+=l
  if x>X:
    break
  ans+=1
print(ans)
n,x = map(int,input().split())
li = list(map(int,input().split()))
d = 0
count = 0
for i in range(len(li)):
    d += li[i]
    if x >= d:
        count += 1
    else:
        break
print(count+1)
from sys import exit

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

for l in L:
	p+=l
	if p>x:
		print(res)
		exit()
	res+=1
    
print(res)
def main():
    N, X = (int(x) for x in input().split())
    L = [int(x) for x in input().split()]
    D = [0]

    for i in range(1, N+1):
        a = D[i - 1] + L[i - 1]
        if a <= X:
            D.append(a)
        else:
            break

    print(len(D))


if __name__ == "__main__":
    main()
n,x = map(int,input().split())
L = list(map(int,input().split()))
cnt = 0
d = 0
for i,l in enumerate(L):
    if d +L[i]<=x:
        d += L[i]
    else:
        print(i+1);exit()
    
print(n+1)
n,x = map(int,input().split())
l = list(map(int,input().split()))
count = 1
sum = 0
for i in range(n):
    sum += l[i]
    if sum  <= x:
        count += 1
print(count)
import itertools
import math
n, x = map(int, input().split())
l = list(map(int, input().split()))

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

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

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

print(ans)
n,x=map(int,input().split())
ls=list(map(int,input().split()))
a=1
d=0
for l in ls:
    d+=l
    if d<=x:
        a+=1
    else:
        break
print(a)
n,x=map(int,input().split())
l=map(int,input().split())

cn=1
ln=0
for i in l:
  ln+=i
  if ln>x:
    break
  cn+=1
  
print(cn)
n,x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
times = 1
for i in range(n):
  d += l[i]
  if d > x:
    break
  times += 1
print(times)
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[0]
count=0
for i in range(n):
    d.append(d[i]+l[i])
for c in d:
    if c<=x:
        count+=1
print(count)
#130
n,x = map(int, input().split())
l = list(map(int, input().split()))

res = 1
sm = 0
for i in range(0,n):
    if sm + l[i] <= x:
        res += 1
    sm += l[i]
print(res)
n,x=map(int,input().split())
l=list(map(int,input().split()))
a=0
i=0
ans=1
while a+l[i]<=x:
  ans+=1
  a=a+l[i]
  i+=1
  if i+1>n:
    break
print(ans)
n,x = map(int,input().split())
bound = list(map(int,input().split()))
cnt = 1
pos = 0
for i in range(n):
  pos += bound[i]
  if pos <= x:
    cnt += 1
  if pos > x:
    break
print(cnt)
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
cnt=1
for i in range(0,n):
    d=d+l[i]
    if d > x:
        break
    else:
        cnt+=1
print(cnt)
def main():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    sum = 0
    for idx, i in enumerate(l):
        sum += i
        if sum > x:
            print(idx + 1)
            break
    else:
        print(n + 1)

if __name__ == '__main__':
    main()
n,x = map(int,input().split())
l = list(map(int,input().split()))

d = 0
c = 1
for i in l:
    d += i
    if(d <= x):c += 1
    else:break
print(c)
N, X = map(int, input().split())

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

for i in L:
    D += i
    if D <= X:
        count += 1
print(count)
# nは跳ねる回数　d1 = 1 dn+1 = dn + ln

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

d = 0
count = 1

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

ans =1
height=0
for i in range(N):
    height += arr[i]
    if height > X:
        break
    ans += 1

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

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

print(cnt)
from itertools import accumulate
N, X = map(int, input().split())
L = list(map(int, input().split()))
acc = [0] + list(accumulate(L))

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

    print(s)
else:
    print("2")
N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1)
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

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

    if d <= x:
        num = num + 1

print(num)
def LI():
  return [int(s) for s in input().split()]

N,X = LI()
L_s = LI()

D = [0]*(N+1)

count = 1

for i in range(1,N+1):
  D[i] = D[i-1] + L_s[i-1]
  if D[i] <= X:
  	count += 1
  
print(count)
N,X = map(int,input().split())

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

D =[]
D.append(0)
x = 0

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

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

print(ans)
n,x=map(int,input().split())
l=list(map(int,input().split()))
s=0
count=1
for i in range(n):
    s+=l[i]
    if(s>x):
      break
    count+=1
    
print(count)
from itertools import accumulate, takewhile
N, X = map(int, input().split())
print(len(list(takewhile(lambda x: x <= X, accumulate(map(int, input().split()))))) + 1)
import bisect
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
for l in L:
  D.append(l+D[-1])
print(bisect.bisect_right(D, X))
N, X  = map(int, input().split())
L = list(map(int, input().split()))

bound = []
for _ in range(N+1):
  bound.append(0)

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

ans = 0

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

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

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

dis = 0
ans = 1
for i in range(n):
    dis += L[i]
    if dis > x:
        dis -= L[i]
        break
    ans += 1

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

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

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

ans = 1
r = 0
for l in L:
    r += l
    if x < r:
        print (ans)
        exit ()
    else:
        ans += 1
print (ans)
n, x = map(int, input().split())
data = [0] + list(map(int, input().split()))
count = 0
tmp = 0
for d in data:
    tmp += d
    if tmp <= x:
        count += 1
    # print(tmp)

print(count)
n,x = map(int,input().split())
l_lst = list(map(int,input().split()))
b = 0
sum_l = 0
for l in l_lst:
  b+=1
  sum_l += l
  if sum_l > x:
    break
if sum_l <= x:
  b+=1

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

d = 0
c = 0

for i in l:
	d += i

	if d <= x:
		c += 1

print(c+1)
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:
        exit
    exit
print(count)
n,x = map(int, input().split())

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

p = [0]

for i in range(1,n+1):
    p.append(p[i-1]+lis[i-1])
    
cnt = 0
for j in p:
    if j <= x:
        cnt += 1
    else:
        break
    
print(cnt)
n,x = map(int,input().split())
L = list(map(int,input().split()))
cnt = 0
for i in range(n+1):
  if sum(L[a] for a in range(i)) <= x:
    cnt += 1
print(cnt)
N, X = map(int, input().split())
L = list(map(int, input().split()))

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

print(cnt)
N, X = map(int, input().split())
*L, = map(int, input().split())
ans = 1
d = 0
for l in L:
    if d + l <= X:
        ans += 1
        d += l
    else:
        break
print(ans)
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=a[i]
  if ans>m:
    break
if ans<=m:
  print(n+1)
else:
  print(i+1)
#b
n,x=map(int, input().split())
l = list(map(int, input().split()))
d = 0
c = 1
for i in l:
    d += i
    if d > x:
        break
    c += 1
print(c)
import bisect
N,X=map(int,input().split())
L=list(map(int,input().split()))
for i in range(N-1):
  L[i+1]+=L[i]
print(bisect.bisect_left(L,X+1)+1)
N, X = map(int, input().split())
L = list(map(int, input().split()))
a = 0
ans = N + 1
for i in range(N):
    a += L[i]
    if a > X:
        ans = i + 1
        break
print(ans)
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
    else:
        break
print(ans)
n,x = map(int,input().split())

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

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

print(len([i for i in d if i <= x]))
n,x = map(int,input().split())

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

l2 = [0]*(n+1)

for i in range(n):
    l2[i+1] = l2[i]+l[i]
    
ans= 0
    
for i in l2:
    if i<=x:
        ans += 1
    else:
        break
    
print(ans)
import bisect
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=[0]
for i in range(N):
    D.append(D[i]+L[i])
print(bisect.bisect_right(D,X))
n,x = map(int, input().split())
l = list(map(int, input().split()))
num = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        num += 1
print(num)
def q2():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]

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

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

    print(ans)


if __name__ == '__main__':
    q2()
n, x = map(int, input().split())
l = list(map(int, input().split()))
ans = 1
p = 0
for i in range(n):
    p += l[i]
    if p <= x:
        ans += 1

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

ans = 1
t = 0
for i in l:
  t += i
  if t <= x:
    ans += 1
  else:
    break

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

cnt = 1
current = 0
for z in l:
    if current + z <= x:
        cnt += 1
        current += z
    else:
        break

print(cnt)
import itertools
import bisect

N, X=map(int, input().split())
L=list(map(int, input().split()))
print(bisect.bisect_right(list(itertools.accumulate(L)), X)+1)
n,x = map(int,input().split())
l = list(map(int,input().split()))
ans = 1
s = 0
for i in range(n):
    s += l[i]
    if s <= x:
        ans += 1
print(ans)
n, x = map(int, input().split())
l = list(map(int, input().split()))
ans = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        ans += 1
print(ans)
a, b = map(int, input().split())
l = list(map(int, input().split()[:a]))
res = 1
d = 0
res= [0]
for item in l:
    res.append(d + item)
    d += item
filtered_res = list(filter(lambda x: x <= b, res))
print(len(filtered_res))
N,X = map(int,input().split())
Ls = list(map(int,input().split()))

D = 0
ans = 1

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

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

#print(l)

a = [0]

for i in range(n):
    a.append(a[i] + l[i])
#    print(a)


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

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

print(count)
import bisect

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

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

print(bisect.bisect_right(L, X))
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
c = 0
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]<=y[1]):
            c+=1
print(c)
n,x=map(int,input().split())
l=[int(x) for x in input().split()]

ans=0
s=0

for ll in l:
    if s <= x:
        ans+=1
    s+=ll

print(ans)
#!/usr/bin/env python3
n, x, *l = map(int, open(0).read().split())
a = 0
while n > a and x >= 0:
    x -= l[a]
    a += 1
print(a)
n,x = map(int,input().split())
listl = []
listl += map(int,input().split())
# print(listl)

cnt=0
d=0
# print(d)
while cnt<len(listl):
    d = d+listl[cnt]
    if d > x:
        break
    # print(d)
    cnt+=1

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

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

print(ans)
N, X = map(int,input().split())
lst = list(map(int,input().split()))

cnt = 0
now = 0
for i in range(N):
    l = now + lst[i]
    cnt += 1
    if now > X:
        break
print(cnt)
import sys

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

D = 0

for i in range(0,N):
    D += L[0]
    if D > X :
        print(i)
        sys.exit()

print(N)
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)
import sys
def input(): return sys.stdin.readline().rstrip()

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

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

if __name__ == '__main__':
    main()
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
d=0
cnt=0
for i in range(len(l)):
    if d>=x:
        print(i+1)
        exit()
    d+=l[i]
n, x = map(int, input().split())
L = list(map(int, input().split()))

ans = 1
sum_L = 0
for j in range(n):
    sum_L += sum_L + L[j]
    if sum_L <= x :
        ans += 1
    else :
        exit(0)
        print(ans)
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])
  if d[i+1]>x:
    break

print(len(d)-1)
def LI():
  return [int(s) for s in input().split()]

N,X = LI()
L_s = LI()

D = [0]*N

count = 1

for i in range(1,N):
  D[i] = D[i-1] + L_s[i-1]
  if D[i] <= X:
  	count += 1
  
print(count)
N,X=map(int, input().split())
L=list(map(int, input().split()))
distance = 0
count = 0
while distance <= X and count < N:
  print(distance)
  distance = distance + L[count]
  count = count + 1
n,x=map(int,input().split())
s=list(map(int,input().split()))
b,c=0,0
while b<=x and len(s)>0:
    c+=1
    b+=s[0]
    del s[0]
print(c)
import bisect as bi
I=lambda:list(map(int,input().split()))
n,x=I()
l=I()
ans=0
t=0
for i in range(1,n):
  l[i]+=l[i-1]
an=bi.bisect(l,x)
print(an)
n, x = list(map(int, input().split()))
Ls = list(map(int, input().split()))

m = Ls[0]
count = 0
for i in range(1,n):
    if m <= x:
        count += 1
        m += Ls[i]
    else:
        break
print(count+1)
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
cnt = 0
for i in l:
    if d <= x:
        d += i
        cnt+= 1
    
    else:
        cnt -= 1
        print(cnt)
    
print(cnt)
#!/usr/bin/env python3


def main():
    N, X = map(int, input().split())
    L_list = list(map(int, input().split()))
    D = 0
    ans = 0
    for n in range(N):
        if D <= X:
            ans += 1
            D += L_list[n]
        else:
            break
    print(ans)


if __name__ == '__main__':
    main()
N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = 0
count = 1
for n in L:
    if D > X or count > N + 1:
        break
    D += n
    count += 1
print(count)
# 初期入力
import sys
input = sys.stdin.readline
N,X = (int(x) for x in input().split())
L = list(map(int, input().split()))
d =[0]*(N+1)
count =1
for i in range(N):
    d[i+1] =d[i] +L[i]
    if d[i+1] < X:
        count +=1
    else:
        break
print(count)
n,k=map(int,input().split())
s=0
l=list(map(int,input().split()))
c=0
for i in range(n):
    s+=l[i]
    if(k<s):
        break
    c+=1
print(c)
n, x = map(int, input().split())
l = list(map(int, input().split()))

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

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

print(count)
n, x = map(int, input().split())
l = input().split()
for i in range(n):
    l[i] = int(l[i])

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

i = 0
s = 0
while(s <= X and i <= len(L)):
  i += 1
  if i < len(L):
    s += L[i]

print(i)
n, x = map(int, input().split())
ns = list(map(int, input().split()))
d = 0
count = 0
for i in range(n):
    if d <= x:
        d += ns[i]
        count += 1
    else:
        break
print(count)
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 CS_L if l <= x])
print(ans)
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]>y[1]):
            if (i==y[0]):
                  i+=1
            break
print(i)
n,x=map(int,input().split())
li=list(map(int,input().split()))
s=0
ans=0
for i in li:
  if s<=x:
    s+=i
    ans+=1
print(ans)