peterverebics/CodeNet_Python_118 huggingface dataset:
#128 b むずい
n,x=map(int,input().split())
l=list(map(int,input().split()))
z=0
ans=1
for i in l:
    z+=i
    if z>x:
        break
    ans+=1
print(ans)
n, X = map(int, input().split())
l = list(map(int, input().split()))
x = 0
c = 1
for i in l:
    x += i
    if x <= X:
        c += 1
    else:
        break
print(c)
N,X = (int(x) for x in input().split())
L = [int(x) for x in input().split()]
s = 0
i = 0
while (s <= X):
  if i >= N:
    print(N+1)
    quit()
  else:
    s = s + L[i]
    i = i + 1
print(i)
N, val= list(map(int,input().split()))
list = list(map(int,input().split()))
d=0
l=[]
for i in list:
  d=d+i
  l.append(d)
count=0
for num in l:
  if num<=val:
    count=count+1
print(count+1)
N, X = map(int, input().split())
L = list(map(int, input().split()))

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

print(cnt)
#ABC 130 B
N,X=map(int,input().split())
L= [int(j) for j in input().split()]
cnt=0
import numpy as np
jump = list(np.cumsum(L))
for j in jump:
    if j <= X:
        cnt+=1
print(cnt+1)
# ABC 130: B – Bounding
N, X = map(int, input().split())
L = [int(s) for s in input().split()]

D = [0]

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

print(len([d for d in D if d <= X]))
N,X= map(int, input().split())
L=list(map(int, input().split()))
D, ans=0, 0
for i in range(N):
    if D<=X:
        ans+=1
        D+=L[i]
    else:
        break
if D<=X:
    ans+=1
print(ans)
N,X=map(int,input().split())
L=list(map(int,input().split()))
cum,count=0,1
for l in L:
    cum+=l
    if cum<=X:count+=1
print(count)
n,x=map(int,input().split())
l=list(map(int,input().split()))
length=0
i=0
while length<=x and i<=n-1:
    length+=l[i]
    i+=1
if length<=x:
    print(n+1)
else:
    print(i)
# input
N, X = map(int, input().split())
L = list(map(int, input().split()))

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

print(cnt)
n,x=map(int,input().split())
li=list(map(int,input().split()))
s=[0]
a=0
for i in li:
  a+=i
  s.append(a)
l=[i for i in s if i<=x]
print(len(l))
a=list(map(int,input().split()))
b=list(map(int,input().split()))
no=1
for i in range(1,a[0]):
    b[i]+=b[i-1]
for i in range(0,a[0]):
    if(a[1]>=b[i]):
        no+=1
    else:
        break
print(no)
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = [0]*(n+1)
ans = 1

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

print(ans)
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    count, D = 1, 0
    for l in L:
        D += l
        if D <= X:
            count += 1

    print(count)


if __name__ == "__main__":
    main()
#ABC 130B
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
print(cnt)
n, x = map(int,input().split())
l = list(map(int,input().split()))

SUM = 0
cnt = 1
for i in l:
    SUM += i
    if SUM > x:
        print(cnt)
        exit()
    cnt += 1
else:
    print(cnt)
N, X = map(int, input().split())
L = [int(l) for l in input().split()]
if sum(L) <= X:
  print(N+1)
  exit()
D = 0
ans = 1
for i in range(N):
  D += L[i]
  if D <= X:
    ans += 1
  else:
    print(ans)
    exit()
import sys
import math
import bisect

def main():
    n, m = map(int, input().split())
    A = list(map(int, input().split()))
    B = [0]
    for a in A:
        B.append(B[-1] + a)
    ans = 0
    for b in B:
        if b <= m:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()
import bisect
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
ans = 1
for i in range(1, n+1):
  d = D[i-1] + L[i-1]
  D.append(d)
  if d <= x:
    ans += 1
  else:
    break
print(ans)
from itertools import accumulate

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

a = accumulate(L)

for key, i in enumerate(a):
    if i > X:
        print(key+1)
        exit()

print(N+1)
n,x = map(int, input().split())
l = list(map(int, input().split()))

s = 1
d = 0
for i in l:
  d += i
  if d <= x:
    s += 1
print(s)
n, x = map(int, input().split())
l = list(map(int, input().split()))
distance = 0
bounds = 1
for i in range(n): 
    distance += l[i]
    if distance <= x:
      bounds += 1
    else:
      break
print(bounds)
# coding: utf-8
# Your code here!
N,X=map(int, input().split())
List=list(map(int, input().split()))
bow=0
cnt=1
for i in range(0,N):
    bow+=List[i]
    if bow>X:
        break
    else:
        cnt+=1

print(cnt)
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
a = 1

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

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

for _ in range(n):
    ans = ans + l[i]
    if ans <= x:
        i += 1
    
print(i+1)
n, x = map(int, input().split())
l = list(map(int, input().split()))
count = 0
d = 0
for i in range(1, n+1):
    d += l[i-1]
    if d <= x:
        count += 1
    else:
        break
print(count+1)
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]
  count = 0
for i in range(N + 1):
  if D[i] <= X:
    count += 1
print(count)
n, x = map(int, input().split())
l = map(int, input().split())

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

sum = 0
ans = 0

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

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

print(cnt)
n, x = map(int, input().split())
l = list(map(int, input().split()))
res = 0
for i in range(n):
    res += l[i]
    if x < res:
        print(i+1)
        exit()
print(i+2)
N,X=map(int,input().split())
L=list(map(int,input().split()))
for i in range(N-1):L[i+1]+=L[i]
count=1
for i in range(N):
    if L[i]<=X:count+=1
print(count)
n, x = list(map(int, input().split()))
l = list(map(int, input().split()))
d = [0]
for i in range(len(l)):
    d.append(d[i] + l[i])
print(len(list(filter(lambda d_i: d_i <= x, d))))
N,X=map(int,input().split())
S=list(map(int,input().split()))

count=1

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

print(count)
n,x = map(int,input().split())
l = list(map(int,input().split()))
ll = 0
ans = 1

for i in l:
    ll += i
    if x < ll:
        print(ans)
        exit()
    ans += 1
print(ans)
N, X = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
di = 0

for li in L:
    di += li
    if di > X:
        break
    cnt += 1

print(cnt)
N,X=list(map(int,input().split()))
L=list(map(int,input().split()))
cnt=1
d=0
for i in L:
    d+=i
    if d<=X:
        cnt+=1

print(cnt)
# Bounding
# https://atcoder.jp/contests/abc130/tasks/abc130_b

from sys import stdin, stdout

n, x = map(int, stdin.readline().split())
l = list(map(int, stdin.readline().split()))
coordinates = [0]
for i in range(1, n + 1):
    next_coordinate = coordinates[i - 1] + l[i - 1]
    if next_coordinate > x:
        break
    coordinates.append(next_coordinate)
stdout.write("%d\n" % len(coordinates))
# 入力の高速化
import sys
input = sys.stdin.readline
N, X = map(int, input().split())
L = [int(x) for x in input().split()]

ans = 1
point = 0

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

print(ans)
import sys

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

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

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

print(cnt)
z = list(map(int, input().split()))
l = list(map(int, input().split()))
count = 0
t = 0
for i in range(0, z[0]+1):
  if (i-1) >= 0:
    count += l[i-1]
  if count <= z[1]:
    t += 1
print(t)
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
for i in range(n):
    if d > x:
        print(i)
        exit(0)
    d += l[i]
if d > x:
    print(n)
else:
    print(n + 1)
N,X = list(map(int, input().split()))
L = list(map(int, input().split()))
L.insert(0,0)
cou = 0
BP = 0
for i in range(N + 1):
    BP += L[i]
    if BP <= X:
        cou += 1
    else:
        print(cou)
        exit()
print(cou)
# 初期入力
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, x = map(int, input().split())
l = list(map(int, input().split()))
L = [0] + l

a = 0
count = 1
for i in l:
    a += i
    if a <= x:
        count += 1
print(count)
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, x = M()
l = LI()
wa = 0
ans = 1
for i in l:
    wa += i
    if wa <= x:
        ans += 1
    else:
        break
print(ans)
N, X = map(int, input().split())
Llist = list(map(int, input().split()))
now = 0
ans = 1
for i in range(N):
    now += Llist[i]
    if now <= X:
        ans += 1
print(ans)
n,x=map(int,input().split())
l=list(map(int,input().split()))
import itertools
l=[0]+l
li = list(itertools.accumulate(l))
a=[li[i] for i in range(len(li)) if li[i]<=x]
print(len(a))
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:
        ans += 1

print(ans)
N, X = map(int, input().split())
L = [int(x) for x in input().split()]
ans = 1
D = 0
for i in range(N):
    D += L[i]
    if D <= X:
        ans += 1
print(ans)
import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))

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

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

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

za = 0


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

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

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

    for cnt in range(2, N + 2):
        D += L[cnt - 2]
        if D > X:
            cnt -= 1
            break

    print(cnt)


if __name__ == "__main__":
    main()
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)
n, x = map(int, input().split())
cnt = 1
now = 0
for l in map(int, input().split()):
  now += l
  if now > x:
    break
  cnt += 1
print(cnt)
N,X = map(int,input().split())
L = list(map(int,input().split()))

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

for i in l:
  y = y + i
  if y <= x:
    ans = ans + 1

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

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

import numpy as np

l = np.cumsum(L)

print(len(l[l<=N])+1)
n, x = map(int, input().split())
L = list(map(int, input().split()))

ans = 1
D_i = 0
for l in L:
  D_i += l
  if D_i <= x:
    ans += 1

print(ans)
n, x = map(int,input().split())
l = [int(i) for i in input().split()]
d = [0] * (n+1)
for i in range(1, n+1):
    d[i] = d[i-1] + l[i-1]

ans = len([i for i in d if i <= x])
print(ans)
k=0
s=0
a,b=map(int,input().split())
L=list(map(int,input().split()))
for i in range(a):
  s+=L[i]
  if s<=b:
    k+=1
print(k+1)
n,x = map(int,input().split())
L = list(map(int,input().split()))
sum = 0
count = 1
for j in range(n):
  sum += L[j]
  if sum <= x:
    count += 1
  else:
    pass
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))
bound_count = 1
d = 0

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

print(bound_count)
r=input().split()
N=int(r[0])
X=int(r[1])
d=[int(s) for s in input().split()]
ans=1
le=0
for i in range(N):
    le+=d[i]
    if le>X:
        print(ans)
        break
    elif i==N-1:
        print(N+1)
    else:
        ans+=1
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()))
D = 0
count = 0
for i in range(N+1):
  if D <= X:
    count += 1
  if i != N:
    D = D + L[i]
print(count)
def resolve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))

    bound = [0]
    for i in range(1, n+1):
        bound.append(l[i-1]+bound[i-1])
    ans = 0
    for i in range(n+1):
        if bound[i] <= x:
            ans += 1
    print(ans)
resolve()
n, x = map(int, input().split())
l = list(map(int, input().split()))
total = 0
count = 0
for i in l:
  total += i
  if total <= x:
    count += 1
print(count + 1)
import itertools
N, X = map(int, input().split())
l = list(map(int, input().split()))
l.insert(0,0)
l_acc = list(itertools.accumulate(l))
answer = [x for x in l_acc if x<=X]
print(len(answer))
n,x=map(int,input().split())
l=[0]+list(map(int,input().split()))
from itertools import accumulate
d=list(accumulate(l))
# print(l)
# print(d)
ans=0
for dd in d:
  if dd<=x:
    ans+=1
print(ans)
def getint():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

num,lim = getint()
l = getint()
sumup = 0
k = True
for i in range(num):
    sumup = sumup + l[i]
    if sumup > lim:
        print(i+1)
        k = False
        break
if k ==True:
    print(num+1)
N, X = map(int, input().split())
Ls = [int(i) for i in input().split()]

Ds = [0]
for i, l in enumerate(Ls):
    Ds.append(Ds[i] + l)

ans = 0
for d in Ds:
    if d <= 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=D+L[i]
    if D<=X:
        ans+=1
    else:
        break
print(ans)
n, x=map(int,input().split())
l=list(map(int, input().split()))
ans=1
cnt=0
for i in range(n):
    cnt+=l[i]
    if cnt > x:
        break
    else:
        ans+=1
    
print(ans)
A,B=map(int,input().split(' '))
l=list(map(int,input().split(' ')))
ans=0
count=1
for i in l:
    ans+=i
    if ans<=B:
        count+=1
print(count)
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]
for i in range(N):
  S.append(S[i] + L[i])
ans = 0
for j in range(N+1):
  if S[j] <= X:
    ans += 1
print(ans)
n, x = map(int,input().split())
l = list(map(int, input().split()))
s = 0
count = 1
for i in l:
    s += i
    if s > x:
        break
    count += 1
print(count)
def solve():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    l = [0]
    d = 0
    for a in A:
        d += a
        l.append(d)
    c = 0
    for a in l:
        if a <= M:
            c += 1

    return c

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

D = [0]

ans = 1

for i in range(0,N):
    D.append(D[i]+L[i])
    if D[i+1] > X:
        break
    else:
        ans += 1

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

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

cnt = 1
a = 0
for i in range(0, len(l)):
  a += l[i]
  if a <= x:
    cnt += 1

print(cnt)
n,x=map(int,input().split())
a = list(map(int,input().split()))
p = 1
f = 0
for i in a:
    f += i
    if f <= x:
        p += 1
    else:
        break
print(p)
n, x = [int(i) for i in input().split()]
l_list = [int(i) for i in input().split()]

ans = 1
d = 0
for l in l_list:
    d += l
    if d > x:
        break
    ans += 1
print(ans)
def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
    print(count)


if __name__ == '__main__':
    solve()
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,x=[int(x) for x in input().split()]
l=[int(x) for x in input().split()]
d=0
cnt=1
for i in range(n):
  d=d+l[i]
  if d<=x:
    cnt+=1
print(cnt)
n, x = map(int, input().split())
l_l = map(int, input().split())
z = 0
cnt = 1
for i in l_l:
    z += i
    if z <= x:
        cnt += 1
    else:
        break
print(cnt)
n, x = map(int, input().split())
l = list(map(int, input().split()))
xlist = [0]
num = 0
for i in l:
    num += i
    xlist.append(num)
cnt = 0
for j in xlist:
    if j <= x:
        cnt += 1
print(cnt)
N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
ans = 1

for i in range(1, N+1):
    D = D+L[i-1]
    if D <= X:
        ans += 1
    else:
        break
        
print(ans)
N,X = map(int,input().split())
L = list(map(int,input().split()))
count = 1
point = 0
for i in range(0,N,1):
    point = point + L[i]
    if X >= point:
        count+=1
    else:
        break
print(count)
class Solution:
    def solve(self, N: int, X: int, L) -> str:

        count = 1
        distance = 0

        for l in L:
            distance += l
            if distance > X:
                break

            count += 1

        return count


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(N, X, L))
from itertools import accumulate

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

b = list(accumulate(l))  # 累積和のリスト

b_n=[int(i) for i in b if i<=x]
print(len(b_n)+1)
N, X = map(int,input().split(" "))
L = [int(i) for i in input().split(" ")]
D = 0
count = 1
for i in range(N):
    D+=L[i]
    if D<=X:
        count+=1
    
print(count)
n, x = map(int, input().split())
ns = list(map(int, input().split()))
d = 0
count = 1
for i in range(n):
    if d + ns[i] <= x:
        d += ns[i]
        count += 1
    else:
        break
print(count)
N,X=map(int,input().split())
L=[int(x) for x in input().split()]
D=[0]*(N+1)
for i in range(1,N+1):
    D[i]=D[i-1]+L[i-1]
ans=0
for d in D:
    if d<=X:
        ans+=1
print(ans)
N, X = [int(i) for i in input().split()]
LS = [int(i) for i in input().split()]

s = 0
cnt = 1

for l in LS:
  s += l
  if s <= X:
    cnt += 1
  else:
    break

print(cnt)
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))

import numpy as np

n, x = mi()
l = li()

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

hane = np.array(hane)
ans = np.count_nonzero(hane <= x)

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

bound = 1
d = 0
for l in L:
    if d + l > X:
        break
    else:
        bound += 1
        d += l
print(bound)
n,x = map(int,input().split())
l = list(map(int,input().split()))
sum = 0
ans = 0
for i in l:
  sum += i
  if sum <= x:
    ans += 1
print(ans+1)
n, x = map(int, input().split())
l = list(map(int, input().split()))
#0start
cnt = 1
suml = 0

for i in range(n):
    suml += l[i]
    if suml <= x:
        cnt += 1
print(cnt)
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:
        print(count)
        quit()
print(count)
N,X=map(int,input().split())
l=list(map(int,input().split()))
d=0
cnt=1
while True:
    
    d+=l[cnt-1]
    if d>X:
        print(cnt)
        break
    cnt+=1
    if cnt==N+1:
        print(N+1)
        break
else:
    
    print(cnt)
n,x=list(map(int, input().split()))
l=list(map(int, input().split()))
res = 1
hane = 0
for i in range(n):
    hane += l[i]
    if hane <= x: res +=1
    else : break
print(res)
n,x=map(int,input().split())
L=list(map(int,input().split()))
f=0
for i in range(n+1):
  if sum(L[a] for a in range(i))<=x:
    f+=1
print(f)
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()
print(n+1)
n ,x = map(int,input().split())
l = [int(k) for k in input().split()]
d = 0
cnt = 1
for i in range(n):
  d += l[i]
  if d <= x:cnt += 1
print(cnt)
N, X = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
dist = 0
for i in range(N):
  dist += L[i]
  if dist > X: break
  cnt += 1
print(cnt)
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 = 0
for j in range(n+1):
    if d[j] <= x:
        ans += 1
    else:
        break

print(ans)
def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = list(accumulate([0] + L))
    ans = 0
    for s in S:
        if X < s:
            break
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()
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]

from bisect import bisect_left, bisect_right

idx = bisect_right(D, x)
print(len(D[:idx]))
read = lambda: list(map(int, input().split()))
n, x = read()
l = read()
s = 0
ans = 1
for ind, d in enumerate(l):
    s += d
    if s > x:
        break
    ans += 1
print(ans)
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

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

for i in range(N+1):
    if sum(Llist[:i]) > X:
        print(i)
        exit()
else:
    print(i+1)