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 = [int(i) for i in input().split()]
D = 0
ans = 1

for i in L:
    D += i
    if D <= X:
        ans += 1
print(ans)

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

Solution (Python):
a,b = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
ar.insert(0,0)
c = 0
ans = 0
for r in ar:
    c += r
    if c <= b:
        ans += 1
print(ans)

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

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

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

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

d = 0
count = 1

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

print(count)

Solution (Python):
N, X = [int(nx) for nx in input().split()]
L = [int(l) for l in input().split()]
jump = 1
x_value = 0
for n in range(N):
  x_value += L[n]
  if x_value <= X:
    jump += 1
  else:
    break
print(jump)

Solution (Python):



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

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

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

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


if __name__ == "__main__":
    main()

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

count = 1
place = 0
for coordinate in coordinates:
  place += coordinate
  if place > x:
    break
  else:
    count += 1
    continue
print(count)

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

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

i = 0
for d in D:
  if d <= X:
    i = i + 1
    
print(i)

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

for i in steps:
    x += i
    if x <= X:
        count += 1
 
print(count)

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

cur_pos = 0
num_jumps_under_X = 1
for L in L_list:
    cur_pos += L
    if cur_pos <= X:
        num_jumps_under_X += 1
print(num_jumps_under_X)

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

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

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

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

count = 1
c = 0
d = 0
for c in l :
    d = d + c
    if (x >= d) :
        count = count + 1
    else:
        break   

print(count)

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
logging.disable(logging.CRITICAL)

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

logging.info(L)

length = 0
counter = 1

for i in L:
    length += i
    if length <= X:
        counter += 1
    
print(counter)

Solution (Python):
from functools import reduce

def main():
    N,X = [int(a) for a in input().split()]
    L = [int(a) for a in input().split()]

    D = 0
    Ds=[D]
    for Li in L:
        D += Li
        Ds.append(D)

    print(len([a for a in Ds if a<=X]))




if __name__ == '__main__':
    main()

Solution (Python):
n,x = map(int, input().split())
l=list(map(int, input().split()))
dic = {}
dic[0] = 0
dic[1] = l[0]
for i in range(n-1):
    dic[i+2] = l[i+1]+dic[i+1]
res = list(filter(lambda a:a<=x,list(dic.values())))
print(len(res))

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

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

Solution (Python):
n,x=map(int,input().split())
lis = list(map(int,input().split()))
cur = 0
res = 1
for i in range(len(lis)):
    cur = cur + lis[i]
    if cur <= x:
        res += 1
print(res)

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

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

D = 0
count = 1
for L in L_list:
    D += L
    if D > X:
        break
    count += 1

print(count)

Solution (Python):
import numpy as np
n,x=map(int,input().split())
l = list(map(int,input().split()))
y = [0]
for i in range(n):
  y.append(y[i]+l[i])
y = np.array(y)
print(np.count_nonzero(y<=x))

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

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
ans=0
while(d<=x):
    ans+=1
    if ans == n+1:
        break
    d=d+l[ans-1]
print(ans)

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

print(i)

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

print(i)

Solution (Python):

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

cnt = 1
bounce = 0

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

Solution (Python):
N, X = map(int, input().split())
list = list(map(int, input().split()))
list.insert(0, 0)
position = 0
bound = 0

for i in list:
    position += i
    if(position <= X):
        bound += 1

print(bound)

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

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

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

count = 1
previous = 0

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

print(count)

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

print(counter)

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

tmp=0
for i,element in enumerate(L):
	tmp+=element
	if tmp>X:
		print(i+1)
		break;
	if i==N-1:
		print(N+1)

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

ans = 0
tmp = 0
for i in l:
  tmp += i
  if tmp <= X:
    ans += 1
  else:
    break
print(ans+1)

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

Solution (Python):
n, x = map(int, input().split())
b = 1
d = 0
for li in map(int, input().split()):
    d += li
    if d > x:
        break
    else:
        b += 1
print(b)

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

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

Solution (Python):


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

ans = 1
h = 0
for Li in L:
    h += Li
    if h <= X:
        ans += 1
    else:
        break

print(ans)

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

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

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

Solution (Python):
line = input()
numbers = line.split(" ")
n = int(numbers[0])
max = int(numbers[1])

line = input()
lList = line.split(" ")
d, count = 0, 1
for i in range(n):
  d += int(lList[i])
  if d <= max:
    count += 1
  
print(count)

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

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

print(ans)

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

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

Solution (Python):
a,b=map(int, input().split())
list = input().split(' ')

s = 0
c = 1

for item in list:
    if (s + int(item)) <= b:
        c += 1
        s += int(item)
    else:
        break

print(c)

Solution (Python):



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

    cnt = 1
    tmp = 0
    f = False
    for i in l:
        tmp += i
        if tmp > x:
            f = True
            break
        cnt += 1

    if f:
        print(cnt)
    else:
        print(n+1)

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

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

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

cnt = 1
dis = 0

for i in l:
    dis += i
    if dis > x:
        break
    cnt += 1

print(cnt)

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

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

Solution (Python):


n,x=map(int,raw_input().split())
l=map(int,raw_input().split())
temp=0
c=1
for i in xrange(n):
 temp+=l[i]
 if temp<=x:
  c+=1
print c

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

Solution (Python):
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


def main():
    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:
            break
        c += 1

    print(c)


if __name__ == '__main__':
    main()

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

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()))
ans = 0
d = []
d.append(0)
for i in range(n):
    d.append(d[i] + l[i])

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

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

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

Solution (Python):
line=input()
items=line.split(' ')

N=int(items[0])
X=int(items[1])
line2=input()
items2=line2.split(' ')

l=[]
for i in range(N):
    l.append(int(items2[i]))

res=[0]
for i in range(2,N+2):
    d=res[i-2]+l[i-2]
    res.append(d)

c=0
for i in res:
    if i<=X:
        c+=1
print(c)

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

temp = 0
for i in range(n):
    temp += l[i]
    if temp > x:
        print(i+1)
        exit()
        break
print(n+1)

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

Solution (Python):

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

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

print(count)

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

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

ans = 1
pos = 0
for a in L:
  pos += a
  if pos > X:
    break
  ans += 1
  
print(ans)

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

d = 0
ans = 1
for a in L:
    d += a
    if d <= x:
        ans += 1
    else:
        break

print(ans)

Solution (Python):
import itertools
n,x = map(int,input().split())
L = [int(i) for i in input().split()]
cnt = 0
tmp = [0]
Sum = list(itertools.accumulate(L))
Sum = tmp + Sum

for i in range(len(Sum)):
    if Sum[i] > x:
        break
    else:
        cnt += 1
print(cnt)

Solution (Python):
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=1
for i in range(len(t)):
  if a+t[i]>s[1]:
    break
  else:
    a=a+t[i]
    b=b+1
print(b)

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

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

print(ans)

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

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

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

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

Solution (Python):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
i = 1
while True:
    if d > x:
        print(i - 1)
        break
    if i == n + 1:
        print(i)
        break
    i += 1
    d += l[i-2]

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()))
ans = 1
total = 0
for i in l:
    total += i
    if total <= x:
        ans += 1
        
print(ans)

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

if __name__ == '__main__':
	main()

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

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

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

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

ans = 1
now = 0

for i in li:
    now += i
    if now <= x:
        ans += 1
    else:
        break

print(ans)

Solution (Python):
def solve(n, x, l):
    ans = 1
    d = 0
    for i in range(n):
        d += l[i]
        if d <= x:
            ans += 1
    return ans

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

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

Solution (Python):
n,x = map(int,input().split())
l = [int(i) for i in input().split()] 
ct = 0
num=0
for i,item in enumerate(l):
  ct+=1
  num+=item
  if(num > x):
  	break;
  elif(i==n-1):
  	ct+=1

print(ct)

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

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

Solution (Python):
n,x=list(map(int, input().split(" ")))
L=list(map(int, input().split(" ")))
count,sum=1,0
for l in L:
    sum+=l
    if sum>x:
        break
    count+=1

print(count)

Solution (Python):

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

cnt = 1
d = 0

for _ in range(n):

    if d+l[cnt-1] <= x:
        d = d+l[cnt-1]
        cnt += 1
        
    else:
        break

print(cnt)

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

count = 1;
sum = 0
for i in range(len(L)):
    sum += L[i]
    if X >= sum:
        count += 1
print(count)

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

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

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

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

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

Solution (Python):
import numpy as np

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

D = [0, 0]

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

D2 = np.array(D)    

D3 = D2[D2 <= X]    

print('{}'.format(D3.size - 1))

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

ruiseki = [0 for _ in range(N+1)]
for i in range(N):
    ruiseki[i+1] += ruiseki[i] + L[i]

ruiseki = list(filter(lambda x: x <= X,ruiseki))
print(len(ruiseki))

Solution (Python):
import numpy as np

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

D = [0, 0]

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

D2 = np.array(D)    

D3 = D2[D2 <= X]    

print('{}'.format(D3.size - 1))

Solution (Python):
n,x = (int(i) for i in input().split())
z = [int(i) for i in input().split()]
p,a = 0,1
for i in z:
  p+=i
  if p>x: break
  else: a+=1
print(a)

Solution (Python):
import numpy as np

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

D = [0, 0]

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

D2 = np.array(D)

D3 = D2[D2 <= X]    

print('{}'.format(D3.size - 1))

Solution (Python):


L_n = []
N, X = map(int, input().split())

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

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


print(cnt)

Solution (Python):
import numpy as np

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

D = [0, 0]

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

D2 = np.array(D)

D3 = D2[D2 <= X]    

print('{}'.format(D3.size - 1))

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

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

Solution (Python):
n,x,*l=map(int,open(0).read().split());print(sum(x>=sum(l[:i+1])for i in range(n))+1)

Solution (Python):
n,x,*l=map(int,open(0).read().split());print(sum(x>=sum(l[:i+1])for i in range(n))+1)

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

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

Solution (Python):
inp = input().split(" ")
n = int(inp[0])
x = int(inp[1])
l = input().split(" ")
d = 0
count = 1

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

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



p = 0
count = 1

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

print(count)

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

print(cnt + 1)

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

print(ans)

Solution (Python):
inp=input().split(' ')
L=input().split(' ')
n=int(inp[0])
l=0;
count=1;
for i in range(n):
  l+=int(L[i])
  if l<=int(inp[1]):
    count+=1
print(count)

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

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




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

print(cnt)

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:
    cnt+=1
print(cnt)

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

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

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

sum_l = 0
count_n = 1
for n in L:
    sum_l += n
    if sum_l <= X:
        count_n += 1

print(count_n)

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

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

print(count)

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

ans = 1
p = 0
for e in L:
    p += e
    if p <= X:
        ans += 1
print(ans)

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(0, N+1):
    if D[j] <= X:
        ans += 1
print(ans)

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

x = 0
for i in range(N + 2):
    x += L[i]
    if x > X:
        break

print(i)

Solution (Python):
from itertools import accumulate, takewhile

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

D = list(takewhile(lambda a: a <= X, accumulate(L)))

print(len(D) + 1)

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

i = 1
D = 0

for l in L:
    D = D + l
    if X < D:
        break
    i = i +1
print(i)

Solution (Python):
l = input().split()
n = int(l[0])
x = int(l[1])
l = input().split()
cnt = 1
d = 0

while(cnt -1 < len(l)):
    d = d + int(l[cnt-1])
    if(d<=x):
        cnt = cnt + 1
    else:
        break

if(cnt > n+1):
    cnt = n+1
print(cnt)

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

D = 0
ans = 1
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()))
D = 0
answer = 1
for l in L:
    D += l
    if D <= X:
        answer += 1
print(answer)

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

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

c = 1
cood = 0
for l in L:
  cood += l
  if cood <= x:
    c += 1
  else:
    break
print(c)

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

a = 0
ans = 0

if a <= X:
    ans += 1

for l in L:
    a += l
    if a <= X:
        ans += 1
        
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

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

Solution (Python):
import sys
def strToInt(strList):
    return [int(i) for i in strList]

N, X = input().split(' ')
line = strToInt(input().split(' '))

tmp = 0
i = 1
while i-1 < int(N):
    tmp += line[i-1]
    if int(X) < tmp:
        print(i)
        sys.exit()
    i=i+1
print(i)

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

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


print(b)

Solution (Python):
n,x=map(int,input().split())
L = list(map(int,input().split()))
count=1
D=0
for i in L:
    D=D+i
    if D<=x:
        count+=1
    else:
        break
 
print(count)

Solution (Python):
N, X = map(int, input().split())
L = [int(i) for i in input().split()]
 
ans = 1
now = 0
for i in range(N):
    now = now + L[i]
    if now <= X:
        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 i in range(N):
  D += L[i]
  if D <= X:
    ans += 1
    

print(ans)

Solution (Python):
a = list(map(int, input().split()))
L = list(map(int, input().split()))
d = 0
ans = 0
i=1
while i==1:
    d += L[ans]
    if d>a[1]:
        break
    ans += 1
    if ans==a[0]:
        break

print(ans+1)

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

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

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

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

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

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

print(c)

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

print(i)

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

ans = 1
d = 0
for i in range(1, n+1):
    d += l[i-1]
    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
i = 1

for d in L:
    D += d
    if D <= X:
        i += 1
        
print(i)

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

count = 0
d = 0

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

print(count) if d>=x else print(count+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:
        cnt += 1
print(cnt)

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

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

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

zahyo = 0
i = 0
while(zahyo <= x):
    
    zahyo = zahyo + li[i]
    
    if zahyo <= x:
        i = i+1
    if i == n:
        break

print(i+1)