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()))
l = [0]
if L[0] <= X:
  l.append(L[0])
  for x in range(N - 1):
    a = l[-1] + L[x + 1]
    if a <= X:
      l.append(a)
    elif a > X:
      break

print(len(l))

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    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]
    print(sum(D[i]<=x for i in range(n+1)))
resolve()

Solution (Python):
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 < len(L):
        D += L[i]
print(count)

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

d = 0
c = 1
for l in L:
    d += l
    if d > X:
        break
    c += 1
print(c)

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

ans = 0
d = 0

for i in range(n):
    if (d <= x):
        ans += 1

    d += l[i]

if (d <= x):
    ans += 1

print(ans)

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

print(ans)

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

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

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

print(ans)

Solution (Python):
import sys


def solve():
    sys.setrecursionlimit(2000)
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n, x = list(map(int, input().rstrip('\n').split()))
    l = list(map(int, input().rstrip('\n').split()))
    cnt = 1
    t = 0
    for i in range(n):
        t += l[i]
        if t <= x:
            cnt += 1
        else:
            break
    print(cnt)


if __name__ == '__main__':
    solve()

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

Solution (Python):
from itertools import accumulate


N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
L = [0] + L
L = list(accumulate(L))

for i, l in enumerate(L):
    if l > X:
        print(i)
        exit()

print(len(L))

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

Solution (Python):
def p_b():
    n, x = map(int, input().split())
    v = 0
    ans = 1
    for i in list(map(int, input().split())):
        v += i
        if v <= x:
            ans += 1
        else:
            break
    print(ans)
    
p_b()

Solution (Python):
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 0

for i in range(n):
    cnt += L[i]
    if cnt <= x:
        D.append(cnt)

print(len(D))

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

print(len(D))

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

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

print (ans + 1)

Solution (Python):
n,k=map(int,(input().strip().split()))
a=0
t=0
if k>=0:
  a+=1
l=list(map(int,input().strip().split()))
for i in l:
  t+=i
  if t<=k:
    a+=1
  else :
    break
print(a)

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

Solution (Python):
N, X = map(int, input().split())
A = [int(i) for i in input().split()]
W = [0] * (N + 1)

for i in range(N):
    W[i + 1] = W[i] + A[i]

print([i <= X for i in W].count(True))

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

count=0
d=0
d_l=[0]
for l in li:
  d=d+l
  d_l.append(d)

for di in d_l:
  
  if di<=x:
    count+=1
print(count)

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

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

print(count)

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

d = 0
count = 0

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

print(count+1)

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

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

print(cnt)

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

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

print(res)

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

Solution (Python):
n, x = map(int, input().split())
l_array = [int(x) for x in input().split()]
d = 0
cnt = 1
for i in range(n):
    d = d + l_array[i]
    if d > x:
        break
    cnt += 1
print(cnt)

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

ans = 1
d = 0

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

print(ans)

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

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

Solution (Python):


def main():
    N,X = map(int, input().split())
    Ls =  [int(s) for s in input().split()]
    range = 0
    count = 1
    for l in Ls:
        range += l
        if range > X:
            break
        count += 1
    print(count)

if __name__ == "__main__":
    main()

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

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

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

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

for j in range(n):
  num += L[j]
  if num <= x:
    ans += 1

print(ans)

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

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

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

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


if __name__ == '__main__':
    main()

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

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

sum = 0
count = 1

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

print(count)

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

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

for i in range(n):
  D+=d[i]
  s.append(D)
for j in range(n+1):
  if x >= s[j]:
    count+=1
print(count)

Solution (Python):
import numpy as np
N, X = map(int, input().split())
a = np.array([0] + input().split(), dtype=np.int32)
b = np.cumsum(a)
print(len((b[b <= X])))

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

Solution (Python):

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

Y=0
ans=1

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

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

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

count = 0
bound = 0

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

print(count+1)

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

print(cnt)

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

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

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

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

print(count)

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

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

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


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

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

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

for i in l:
  sum=sum+i
  if sum<=x:
    count=count+1
  else:
    break
print(count)

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

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

d = 0
ans = 1
for y in l:
    d += y
    if d > x:
        break
    ans += 1
print(ans)

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

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

count = 1
dist = 0

for n in range(N):
    dist += L[n]
    if dist > X:
        break
    count += 1
print(count)

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

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):
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):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0

cnt = 0
while D <= X and cnt <= N:
	if cnt == N:
		cnt += 1
		break
	D = D + L[cnt]
	cnt += 1

print(cnt)

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

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

Solution (Python):
n, x = map(int, input().split())
result, cur = 1, 0

for jump in map(int, input().split()):
    
    cur += jump
    
    if cur <= x:
        result += 1
    else:
        break

print(result)

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

cd = 0
ans = n + 1 

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

print(ans)

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

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

print(counter)

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

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

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

Solution (Python):
def solve():
    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(len([x for x in D if x<=X]))

if __name__ == '__main__':
    solve()

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

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

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

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

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

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

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

D = [0] * (N + 1)

counter = 0

for i in range(1,len(L)+1):
	D[i] = D[i - 1] + L[i - 1]
	
	
for i in range(0,len(D)):
	if D[i] <= X:
		counter += 1
	
print(counter)

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

print(ans)

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

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

print(count)

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

x_ball = 0
out_flg = 0

for t in range(N):
    x_ball += L[t]
    if x_ball > X:
        out_flg = 1
        break

print(t+1 if out_flg == 1 else t+2)

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

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

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

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

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

Solution (Python):

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


boundCnt = i[0]
limit = i[1]


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

landpoints.insert(0,0)
boundCnt += 1

nowCnt = 0
nowLandpoints = 0

for i in range(boundCnt):

   nowLandpoints += landpoints[i]
   if nowLandpoints > limit:
      break

   nowCnt += 1

print(nowCnt )

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

print(D)

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

y = 0
p = 0
for i in range(n+1):
  if i == 0:
    c = 0
  else:
    c = p + l[i-1]
  
  if c <= x:
    y += 1
  p = c

print(y)

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

count = 1
d = 0

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

print(count)

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

Solution (Python):


line1 = input()
line2 = input()
sN, sX = line1.split()
N = int(sN)
X = int(sX)
sL = line2.split()
L = []
for sl in sL:
    L.append(int(sl))

D = 0
cnt = 1

for l in L:
    D += l
    if D <= X:
        cnt += 1

print(cnt)

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

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

for l in L:
  cur += l
  if(cur > X):
    break
  result += 1
    
print(result)

Solution (Python):
n, x = map(int, input().split())
src = list(map(int, input().split()))
li = [0]
h = 0
for s in src:
    h += s
    if h <= x:
        li.append(h)
print(len(li))

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

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

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

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

d_prev = 0
count = 1

for i in l_list:
    di1 = d_prev + i
    if di1 > x:
        break
    else:
        d_prev = di1
        count +=1

print(count)

Solution (Python):
n,x = map(int, input().split())
l =[int(_) for _ in input().split()]
a = [0]
s = 0
for i in range(len(l)):
  s = s+l[i]
  if s<=x:
    a.append(s)
print(len(a))

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

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

print(ans)

Solution (Python):
from sys import stdin, setrecursionlimit
setrecursionlimit(10000000)

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()
ii = lambda: int(input())

n, k = mi()
a = lmi()
d = 0
cnt = 1
for i in range(n):
    d += a[i]
    if d > k:
        break
    cnt += 1
print(cnt)

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

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

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N,X = map(int, input().split())
    LS = list(map(int, input().split()))
    res = [0]*(N+1)
    for i in range(N):
        res[i+1] = res[i]+LS[i]
    res.sort()
    print(bisect_right(res,X))

if __name__ == '__main__':
    main()

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=1
for y in l:
  x-=y
  if x>=0:
    ans+=1
  else:
    break
print(ans)

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

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

for l in L:
  tmp = tmp + l
  if tmp <= X:
    ans += 1
  else:
    break
  

print(ans)

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

d=0
count=1
for l in L:
  d=d+l
  if X>=d:
    count +=1
print(count)

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

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

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

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

d = 0
count = 1
for l in L:
    d = d + l
    if A>= d:
        count += 1
        
    
print(count)

Solution (Python):

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

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


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

Solution (Python):


n, x = map(int, raw_input().split())
l = map(int, raw_input().split())

pos = 0
count = 1

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

print count

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

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

cnt = 1
dis = 0
for i in range(n):
    dis = dis + int(L[i])


    if dis <= x :
            cnt +=1

print(cnt)

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

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

Solution (Python):


line1 = input()
line2 = input()
sN, sX = line1.split()
N = int(sN)
X = int(sX)
sL = line2.split()
L = []
for sl in sL:
    L.append(int(sl))

D = 0

if D <= X:
    cnt = 1
else:
    cnt = 0

for l in L:
    D += l
    if D <= X:
        cnt += 1

print(cnt)

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

jump = 0
count = 1
for i in l:
    jump += i
    if jump <= x:
        count += 1
    else :
        break
print(str(count))

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

x = 0
i = 0

while x <= X :
    if i == N:
        i += 1
        break
    x += L[i]
    i += 1

print(i)

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

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

Solution (Python):
import numpy as np

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

XX=[0]
D=0
for i in L:
    D+=i
    XX.append(D)
XX=np.array(XX)
print(np.count_nonzero(XX<=X))

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

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

a=1
d=0

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

Solution (Python):


N,X=(int(x) for x in  input().split())
D=0
L=(int(x) for x in  input().split())
flag=True
for j,i in enumerate(L):
    D+=i
    if D>X:
        flag=False
        break
  
  
if flag:
    print(N+1)
else:
    print(j+1)

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

ans=0
d=0

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

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

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

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

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

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

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

i = 0
D = 0
cnt = 1

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

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

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

bound = 1
d_bef = 0

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

print(bound)

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

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

Solution (Python):
n, x = map(int, input().split())
l_list = [int(i) for i in input().split()]
c = 0
for i in range(len(l_list)+1):
    if sum(l_list[:i]) <= x:
        c += 1
    else:
        break
print(c)

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

Solution (Python):
def main():

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

if __name__ == "__main__":
    main()

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

d = 0
result = 0

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

    
print(result)

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

zahyou = [0]*(N+1)

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

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

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

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

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

print(ans)

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

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

bounds = [0]

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

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