Problem:
 Score : 200 points    Problem Statement A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0 , and the i -th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1} .  How many times will the ball make a bounce where the coordinate is at most X ?      Constraints  1 \leq N \leq 100  1 \leq L_i \leq 100  1 \leq X \leq 10000  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  X  L_1  L_2  ...  L_{N-1}  L_N       Output Print the number of times the ball will make a bounce where the coordinate is at most X .        Sample Input 1 3 6
3 4 5      Sample Output 1 2  The ball will make a bounce at the coordinates 0 , 3 , 7 and 12 , among which two are less than or equal to 6 .       Sample Input 2 4 9
3 3 3 3      Sample Output 2 4  The ball will make a bounce at the coordinates 0 , 3 , 6 , 9 and 12 , among which four are less than or equal to 9 .

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

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

if x >= sum(l):
    ans += 1

print(ans)

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

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

dp = [-1]*(N+2)
dp[1] = 0

ans = 1
for i in range(2, N+2):
    dp[i] = dp[i-1]+L[i-2]
    if dp[i] <= X:
        ans += 1

print(ans)

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

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

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

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

print(cnt)

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

Solution (Python):
import numpy as np
N,X = map(int,input().split())
sumarr = np.cumsum(list(map(int,input().split())))
print(len(sumarr[sumarr<=X])+1)

Solution (Python):
import numpy as np
N,X = map(int,input().split())
arr = list(map(int,input().split()))
sumarr = np.cumsum(arr)
print(len(sumarr[sumarr<=X])+1)

Solution (Python):
a,b=map(int,input().split())
n = list(map(int, input().split()))
bound=[0]
for i in range(len(n)):
  bound.append(n[i])
  bound[i+1]+=bound[i]

print(len([i for i in bound if i <=b ]))

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

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

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

Solution (Python):
A,D = map(int,input().split())
X = list(map(int,input().split()))
C = [0]
q = 0
for i in range(A):
  if i == 0:
    p = X[0]
    C.append(p)
  else:
    p = p + X[i]
    C.append(p)
for i in C:
  if D >= i:
    q += 1

print(q)

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

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

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

Solution (Python):
from itertools import accumulate

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

B = [0] + [x for x in accumulate(A)]

if B[N] <= X:
    ans = N + 1
else:
    ans = 0
    for i in range(N):
        if B[i] > X:
            break
        ans += 1
print(ans)

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

print(ans)

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
dis = 0
ans = 0
if sum(l) <= x:
    print(len(l) + 1)
else:
    while (dis <= x):
        dis += l[ans]
        ans += 1
    print(ans)

Solution (Python):
from itertools import accumulate
N, X = map(int, input().split())
L = list(map(int, input().split()))
print(sum(map(lambda x:x<=X, accumulate([0]+L))))

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

ans = 1
D = 0

for i in L_list:
    D += i
    if D <= X:
        ans += 1

print(ans)

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

ans = 0
D_list = [0]

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

for k in D_list:
    if k <= X:
        ans += 1

print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

n, x = ril()
ls = ril()
s = 0
count = 0
for l in ls:
    s += l
    if s <= x:
        count += 1
    else:
        break
print(count + 1)

Solution (Python):
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


def LI(): return list(map(int, input().split()))


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    X, A= LI()
    
    if(X >= A):
        print(10)
    elif(X<A):
        print(0)
    return




def B():
    N, X= LI()
    L=LI()
    
    ans=1
    D=0
    for i in range(2,N+2):
        D=D+L[i-2]
        if (D>X):
            break
        ans+=1
    print(ans)
    


    
    return




def true():
    S = input()
    S = S[:-1]

    tmp = 0
    for x in range(1 << (len(S)-1)):
        func = S[-1]
        for i in range(len(S)-1):
            if(x & (1 << i)):
                tmp += int(func)
                func = S[-2-i]
            else:
                func = S[-2-i]+func
        tmp += int(func)
    print(tmp)

    return


def flagcounter(x):
    if (x == 0):
        return 0
    return flagcounter(x >> 1)+(x & 1)


def C():
    W, H, x,y=LI()
    
    if (W/2==x and H/2==y):
        print(W*H/2,1)
    else:
        print(W*H/2,0)

    return





def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return




def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return




def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    



def solution(S):
    
    N = len(S)

    pass



if __name__ == '__main__':

    B()

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

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

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


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

print(cnt)

Solution (Python):
n,x=map(int,input().split())
L = list(map(int, input().split()))
c = 1
D = 0
for i in L:	
    D = D + i
    if D > x:
        print(c)
        exit()
    c = c + 1
print(c)

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

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

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

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

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

from itertools import accumulate

Lcum = accumulate(L)

count = 1
for l in Lcum:
    if l > X:
        print(count)
        exit()
    else:
        count += 1

print(N+1)

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

g=0
k=0
for i in range(n):
    g+=a[i]
    if g<=x:
        k+=1
print(k+1)

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

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

print(ans+1)

Solution (Python):
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)
        exit()
print(n+1)

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

l = [int(i) for i in input().split()]
d = 0
count = 1
for i in l:
    d = d + i
    if d <= x:
        count += 1

print(count)

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

for i in range(n):
    a = l[i] + d[i]
    d.append(a)

D = [i for i in d if i <= x]
print(len(D))

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

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






count = 1
total = 0
for i in range(len(L)):
    total += L[i]
    if total <= X:
        count += 1
print(count)

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

max_x = N + 1
start = [0]
for i in range(N):
  s = start[i] + L[i]
  if s <= X:
  	start.append(s)
  else:
    max_x = i+1
    break
print(max_x)

Solution (Python):

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

def D(i):
        if i == 0:
                return 0
        return D(i - 1)+ L[i - 1]

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

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

ans = []

for i in range(n+1):
    k = sum(l[:i])
    if k <= x:
        ans.append(k)
        
print(len(ans))

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

Solution (Python):

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

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

Sum = 0
Num = 1

for i in range(N):

    Sum += L[i]

    if Sum <= X:
        Num += 1
    else:
        break

print(Num)

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

a = 0
c = 1
for i in l:
	a += i
	if a > x:
		print (c)
		exit()
	c += 1
print (c)

Solution (Python):

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


c=1

D=0

for x in l:

  D=D+x


  if D<=X:
    c+=1

print(c)

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

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

cusum = [0]
for i in range(n):
    cusum.append(cusum[i]+l[i])

print(bisect.bisect_right(cusum, x))

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

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

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

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

Solution (Python):
import sys

N, X = map(int, (input().split()))
L = list(map(int, input().split()))
point = 0
count = 1

for x in range(0, N):
    point+=L[x]
    if(point<=X):
        count+=1
    if(point>=X):
        print(count)
        sys.exit()

print(count)

Solution (Python):
N, X = map(int, input().split())
now = 0
res = 1
for l in map(int, input().split()):
    now += l
    if now <= X:
        res += 1

print(res)

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

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

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[sum(l[:i+1]) for i in range(len(l))]
print(sum([a<=x for a in d])+1)

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

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

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

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

d = 0
c = 1

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

    
print(c)

Solution (Python):
a=list(map(int,input().split()))
l=list(map(int,input().split()))
l.insert(0,0)
n=a[0]
x=a[1]
t=0
cnt=0
for k in l:
  t+=k
  if(t<=x):
    cnt+=1
print (cnt)

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

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

d=0
count=1
for i in range(0,N):
    d+=L[i]
    if d<=X:
        count+=1

print(count)

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):

import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

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

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

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

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

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

count = 1
d = 0

for i in range(n):
    d += li[i]
    if x >= d:
        count += 1

print(count)

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

for i in range(1, N + 1):
    D_list.append(D_list[i - 1] + L_list[i - 1])

for i in range(N + 1):
    if X < D_list[i]:
        print(i)
        exit()
    elif X == D_list[i]:
        print(i + 1)
        exit()

print(i + 1)

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

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

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

print(ans)

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

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

l = [num for num in map(int, input().split(' '))]



ans = 1
d = 0

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

print(ans)

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

bound = 1
coordinate = 0

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

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

Solution (Python):
N,X = map(int,input().split())
L = [int(x) for x in input().split()]
D = [0] * (N+1)
buf = 1

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

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

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

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

l_sum = 0
ans = 1

for l1 in L:
    l_sum += l1
    if l_sum <= X:ans += 1
    else:break
print(ans)

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

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

print(ans)

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

print(ans)

Solution (Python):
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
ans = 0


[N, X] = inpl()
listL = inpl()
nlistD = np.array([0]*(N+1))

for i in range(len(nlistD)-1):
    nlistD[i+1] = nlistD[i]+listL[i]

ans = (nlistD<=X).sum()


print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(N, X, lr):
    """Test Case
    >>> print_ans(3, 6, [3, 4, 5])
    2
    >>> print_ans(4, 9, [3, 3, 3, 3])
    4
    """
    counter = 1
    ans_sum = 0
    for l in lr:
        ans_sum += l
        if ans_sum > X:
            break
        else:
            counter += 1
    print(counter)

if __name__ == '__main__':
    N, X = map(int, input().rstrip().split())
    lr = list(map(int, input().rstrip().split()))
    print_ans(N, X, lr)

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


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

tmp = [1 if di<=x else 0 for di in d]
ret=sum(tmp)

print(ret)

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

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

print(count)

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

k = 0
s = 1

for i in range(n):
	if k <= x:
		
		k = k + l[i]
		
		if k <= x:
			s = s + 1
	else:
		pass

print(s)

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

Solution (Python):
n,x=(int(x) for x in input().split())
list = input().split()
list = [int(s) for s in list]
list.append(0)
d = 0
count = 0

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

print(count)

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

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

Solution (Python):

import sys, math
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans=count=0


n,k=map(int,input().split())
l=list(map(int,input().split()))
for li in l:
    count+=li
    if count<=k:
        ans+=1
print(ans+1)

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

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

print(cnt)

Solution (Python):
N,X=map(int,input().split(' '))
L=list(map(int,input().split(' ')))
count=1
S=0
for x in L:
  S+=x
  if S<=X:
    count+=1
  else:
    break

print(count)

Solution (Python):



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

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

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
d = [0]*(N+1)
d[0] = 0

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

print(sum(1 for x in d if x<=X))

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

dist, count = 0, 1
for i in range(n):
    dist += l[i]
    if dist > x:
        break
    count += 1

print(count)

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

Solution (Python):

import sys



from bisect import bisect_left as bi_l, bisect_right as bi_r
import itertools





def main():
    n, x, *l = [int(i) for i in sys.stdin.read().split()]
    
    culmative_sum = list(itertools.accumulate(l))
    ans = 1 + bi_r(culmative_sum, x)
    print(ans)

if __name__ == "__main__":
    main()

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

Solution (Python):

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

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

if s <= X:
    count += 1

print(count)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
def input():
    return sys.stdin.readline().rstrip()

def main():
    N,X=map(int,input().split())
    L=list(map(int,input().split()))
    ans=1
    D=0
    for i in L:
        D+=i
        if D<=X:
            ans+=1
        else:
            break
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n, x = list(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)
        exit()

print(n + 1)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import itertools

N,X,*L = map(int,read().split())

answer = sum(x <= X for x in itertools.accumulate([0]+L))
print(answer)

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

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

arr = list(map(int, input().split()))
cum_sum = [0] + list(accumulate(arr))

idx = bisect(cum_sum, x)
print(idx)

Solution (Python):
n, x = map(int, input().split())
L_list = list(map(int, input().split()))
d = 0
count = 1

for l in L_list:
    d = d + int(l)
    if d <= x :
        count += 1
else:
    print(count)

Solution (Python):
nx = list(map(int, input().split()))
ln = list(map(int, input().split()))
n = nx[0]
x = nx[1]

dn = 0
count = 1
for i in range(0, n, 1):
    dn += ln[i]
    if dn > x:
        break
    count += 1
print(count)

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

print(ans)

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

D = 0
count = 1

for i in range(len(L)):
    D = D+L[i]
    if(D<=x):
        count += 1
    else:
        break
print(count)

Solution (Python):

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

def main():
    N, X = map(int, input().split())
    L_l = [int(x) for x in input().split()]

    h = 0
    ans = 1
    for l in L_l:
        h = h + l
        if h > X:
            break
        else:
            ans = ans + 1

    print(ans)






if __name__ == '__main__':
    main()

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

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

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

sum = 0
count = 1
for x in L:
    sum += x
    if sum <= X:
        count += 1
    else:
        break
print(count)

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

cnt = 1
d = 0

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

Solution (Python):
n,x = map(int,input().split())
l = list(map(int,input().split()))
i=0
suml=0
if sum(l)<=x:
    print(len(l)+1)
else:
    while suml<=x:
        suml=suml+l[i]
        i=i+1
    print(i)

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

d = 0
cnt = 1

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

print(cnt)

Solution (Python):
n,x = map(int,input().split())
arr = list(map(int,input().split()))
chk = 0
cnt = 1
for i in range(len(arr)):
    chk = chk + arr[i]

    if chk <= x:
        cnt += 1
    else:
        print(cnt)
        exit()

print(cnt)

Solution (Python):
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(6, [3, 4, 5]), 2)

    def test_2(self):
        self.assertEqual(think(9, [3, 3, 3, 3]), 4)


def solve():
    x, l = read()
    result = think(x, l)
    write(result)


def read():
    n, x = read_int(2)
    return x, read_int(n)


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(x, l):
    count = 1
    s = 0
    for e in l:
        s += e
        if s > x:
            break
        count += 1
    return count


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

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

now = 0
ans = 1
for i in ll:
    now += i
    if now <= x:
        ans += 1

print(ans)

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