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 = (int(i) for i in input().split())
l = [int(i) for i in input().split()]
b = [0]
d=0
for i in range(n):
  d+=l[i]
  b.append(d)
print(sum(i <= x for i in b))

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

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

Solution (Python):
from sys import stdin

n,x = [int(x) for x in stdin.readline().rstrip().split()]
li = list(map(int,stdin.readline().rstrip().split()))

from itertools import accumulate

li2 = list(accumulate(li))
li2.append(0)
li2.sort()
print(len([i for i in li2 if i <= x]))

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

list_L_hane = [0] + list_L
for i in range(1, len(list_L_hane)):
    list_L_hane[i] = list_L_hane[i] + list_L_hane[i - 1]

score = 0
for i in list_L_hane:
    if i <= x:
        score += 1
    else:
        break

print(score)

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

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

Solution (Python):
limit = input().split()
hane = input().split()
hane = [int(i) for i in hane]

tmp = 0
ans = 0
for i in hane:
  tmp += i
  if tmp<=int(limit[1]): ans +=1
  else: break
    
print(ans+1)

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

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

if d <= x:
    count += 1
print(count)

Solution (Python):
n=[int(i) for i in input().split()]
ans=1
a=[int(i) for i in input().split()]
am=0
for i in range(n[0]):
  am+=a[i]
  if(am<=n[1]):
    ans+=1
print(ans)

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

a = [sum(l[:x+1]) for x in range(len(l))]
b = []
for i in range(len(a)):
    if a[i] <= x:
        b.append(a[i])

print(b.index(b[-1])+2)

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

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

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

Solution (Python):

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

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

d, res = 0, 1
for l in L:
    d += l
    if d <= X:
        res += 1
    else:
        break
print(res)

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

ans = 0
total = 0
if total <= X:
    ans += 1
for i in L:
    total += i
    if total <= X:
        ans += 1

print(ans)

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

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

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

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

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

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

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

print(res)

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

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

print(len(D))

Solution (Python):
import bisect

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

li=[0]*(n+1)

for i in range(n):
  li[i+1]=li[i]+l[i]
  
print(bisect.bisect(li,x))

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

ans=0
a=0
for i in range(n):
  a+=l[i]
  ans+=1
  if a>x:break
  elif i==n-1:ans+=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
    else:
        break
print(ans)

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

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

print(cnt + 1)

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

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

for i in range(2,n+2):
    L += l[i-2]
    if i == n+1 and L<x:
        print(n+1)
        exit()

    if L > x:
        print(i-1)
        exit()
    if L == x:
        print(i)
        exit()

    else:
        continue

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


print(count)

Solution (Python):
import numpy as np


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

initial_val = 0
res = 0

if initial_val <= X:
    res += 1

for i in range(N):
    cd = initial_val + L_list[i]
    if cd <= X:
        res += 1
    initial_val = cd
    i += 1

print(res)

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

ans = 1
pos = 0
for i in range(n):
	pos = pos + li[i]
	if pos <= x:
		ans += 1
print(ans)

Solution (Python):

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


coordinate=0
ans = 1
for e in L:
    if coordinate+e<=x:
        ans+=1
        coordinate+=e
    else:
        break

print(ans)

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

Solution (Python):
from sys import stdin

n, x = [int(x) for x in stdin.readline().rstrip().split()]
l_lst = [int(x) for x in stdin.readline().rstrip().split()]
d = 0
count = 0

for i, l in enumerate(l_lst):
  if d > x:  break
  else: count += 1
  d += l

if i == n-1 and d <= x:
  count += 1
 
print(count)

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

Solution (Python):


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

Solution (Python):
N,X=map(int,input().split())
List=list(map(int,input().split())) 
count=1
for i in range(1,N+1):
  if sum(List[0:i])<=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 range(1,N+1):
    D.append(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()))
xs=[]
x=0
time=1
for i in range(N):
  x+=L[i]
  xs.append(x)
for i in range(N):
  if xs[i]<=X:
    time+=1
  else:
    break
print(time)

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

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 d <= x:
        count += 1
    if i < n:
        d += l[i]
print(count)

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=sum+L[i]
  if sum>x:
    break
  count=count+1
print(count)

Solution (Python):
n, x = list(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):
def slove():
    import sys
    input = sys.stdin.readline
    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
    print(cnt)


if __name__ == '__main__':
    slove()

Solution (Python):
N, X = map(int, input().split())
L = list(map(int, input().split()))
cnt = 0
x = 0
i = 0
while(X >= x):
    cnt += 1
    try:
        x += L[i]
    except Exception as identifier:
        break
    i += 1
print(cnt)

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

ans = [0]
cnt = 0

for i in L:
	cnt = i + cnt
	if cnt<=X:
  		ans.append(cnt)
	else:
		break
print(len(ans))

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

    count = 1
    distance = 0

    for l in L:
        distance += l
        if distance <= 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()))

ans = [0]
cnt =0
for i in L:
    cnt =i + cnt
    if cnt <= X:
        ans.append(cnt)
    else:
        break
   
print(len(ans))

Solution (Python):
import sys

def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 1
    D = 0
    for a in A:
        D += a
        if D > X:
            break
        cnt += 1

    return cnt

if __name__ == '__main__':
    print(main())

Solution (Python):
def resolve():
    n,x = list(map(int, input().split()))
    lll = list(map(int, input().split()))
    d = 0
    flag=False
    count = 1
    for i in range(n):
        d = d + lll[i]
        if d > x:
            flag = True
            print(count)
            break
        else:
            count += 1
    if flag == False:
        print(n+1)
resolve()

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

Solution (Python):
import bisect
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = [0 for _ in range(N+1)]
for i in range(1,N+1):
    D[i] = D[i-1]+L[i-1]
ind = bisect.bisect_right(D,X)    
print(ind)

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

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])
    if d[i] > x:
        print(len(d) - 1)
        exit()
print(n+1)

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

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

count=1
D=0
for move in L :
    D = D + move
    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 l:
    d = d+i
    if d <= x:
        cnt += 1
print(cnt)

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

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

num = 0
ans = 1
for i in l:
    num += i
    if num > m:
        break
    else:
        ans +=1
    
print(ans)

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

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

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

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

ans=0
jump=0
for l in L:
  if jump<=x:
    ans+=1
  jump=jump+l
if jump<=x:
  ans+=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(0, 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()))
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 = list(map(int,input().split()))
count = 1
num_sum = 0
for i in range(n):
    num_sum += l_list[i]
    if num_sum > x:
        break 
    count += 1
print(count)

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

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

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

Solution (Python):
import sys
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
i = 0
while D <= X:
    D = (D + L[i])
    i += 1
    if i == N and D <= X:
        print(i+1)
        sys.exit()
print(i)

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

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

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

arr=[]
for i in range(n+1):
  if i==0:
    arr.append(0)
  else:
    arr.append(arr[i-1]+L[i-1])

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

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

i = 0
while i <= N-1:
  S.append(S[i]+L[i])
  i += 1
  
j = 0
while j <= N:
  if S[j]<= X:
    c += 1
    j += 1
  
  else:
    j += 1

    
print(c)

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

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

Solution (Python):



from sys import stdin
import itertools






temp = stdin.readline().split()
N = int(temp[0])
X = int(temp[1])

data = []
write = stdin.readline().split()
for i in range(N):
    data.append(int(write[i]))
    
count = 1
dis = 0

for d in data:
    dis += d
    if dis <= X:
        count += 1
    else:
        break

print(count)

Solution (Python):
n,disup=map(int,input().split())
A=list(map(int,input().split()))
dis=0
ans=1
for i in A:
  dis+=i
  if dis>disup:
    print(ans)
    exit()
  if dis==disup:
    print(ans+1)
    exit()
  ans+=1
print(ans)

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

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

D = 0
ans = 1

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

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

print(count)

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

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

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

print(count)

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

for i in range(len(l)):
    if i == 0:
        bl[i] = l[i]
    else:
        bl[i] = l[i] + bl[i-1]

bl = list(filter(lambda i: i<=x, bl))
print(len(bl)+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:
        count += 1
    else:
        break
print(count)

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
  else:
    break
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=d+L[i]
   if d<=x:
       c+=1
print(c)

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
	else:
		break

print(c)

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

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

Solution (Python):
N,X = map(int,input().split())
L = list(map(int,input().split()))
a = 1
goukei = 0
for x in L:
  goukei += x
  if goukei > X:
    break
  a+=1
print(a)

Solution (Python):
a, b = map(int, input().split())
k = 1
s = 0
for i in map(int, input().split()):
    if s + i <= b:
        k += 1
    s += i
print(k)

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

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

Solution (Python):
n = raw_input()
input = n.split(" ")
n, x = input[0], input[1]
l = raw_input().split(" ")
current = 0
bounce = 1
for i in range(len(l)):
    current += int(l[i])
    if current <= int(x):
        bounce += 1
    else:
        break
print(bounce)

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

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

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

Solution (Python):
a, b = map(int, input().split())
k = 1
s = 0
for i in map(int, input().split()):
    if s + i <= b:
        k += 1
    s += i
print(k)

Solution (Python):
import sys
from math import ceil

def input():
    return sys.stdin.readline().strip()

def iinput():
    return int(input())

def finput():
    return float(input())

def tinput():
    return input().split()

def rinput():
    return map(int, tinput())

def rlinput():
    return list(rinput())

def nok(a, b):
    m = a * b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a + b)    


def main():
    n, x = rinput()
    l = rlinput()
    d = 0
    res = 1
    for i in range(n):
        d += l[i]
        if d > x:
            break
        else:
            res += 1
    print(res)
    
    
    
main()

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

Solution (Python):
n,x=input().split()
L = list(input().split())
d = 0
i = 0
while d <= int(x) and i<int(n):
    d+=int(L[i])
    i+=1
if d > int(x):
    print(i)
else:
    print(i+1)

Solution (Python):
n, m = map(int, input().split())
l = [int(x) for x in input().split()]
answ = 1
h = 0
for k in l:
  h += k
  if h > m:
    break
  else:
    answ += 1
print(answ)

Solution (Python):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = [0]
cnt = 1
while cnt != n + 1 and d[-1] <= x:
	d.append(d[-1] + l[cnt - 1])
	cnt += 1
if d[-1] <= x: 
	print(cnt)
else:
	print(cnt - 1)

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

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

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

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

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

Solution (Python):

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

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

for i in L:
    tmp += i
    if tmp > X:
        break

    output += 1

print(output)

Solution (Python):
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(len(L)+1) if sum(L[:x])<=X]
if N+1>=len(s):
  print(len(s))
else:
  print(N+1)

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

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

s = 0
cnt = 1
for n in range(N):
    s += L[n]
    if s > X:
        break
    cnt += 1

print (cnt)

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

ans = 1
distance = 0
for n in L:
    distance = distance + n
    if distance <= X:
        ans += 1
    else:
        break

print(ans)

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

Solution (Python):
from itertools import accumulate


def solve(string):
    n, x, *l = map(int, string.split())
    return str(len(list(filter(lambda a: a <= x, list(accumulate(l))))) + 1)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

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

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

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

count=1

kazu=0

for i in hr :
    
    kazu += i 
    
    if kazu <= X:
        count +=1

print(count)

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

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

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

count = 1
s = 0
for num in nums:
    s += num
    if s <= x:
        count += 1
    else:
        break
print(count)

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

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

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

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

Solution (Python):
n,x=map(int,input().split())
r=input().split()
count=1
d=0
for item in r:
  d+=int(item)
  
  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
c = 1
for i in range(0,n):
  D += L[i]
  if D <= x:
    c += 1  
print(c)

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

for i in range(N):
    if D[i]+L[i] > X:
        break
    D.append(D[i]+L[i])
print(len(D))

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

d = 0
H = []

H.append(0)
for li in L:
    d = d + li
    H.append(d)

count = 0
for hi in H:
    if hi <= X:
        count += 1
print(count)

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

for i in range(n):
  bound.append(bound[i] + l[i])

print(sum(1 for _ in bound if _ <= x))

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
print(bound)

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

count=0
for i,j in enumerate(itertools.accumulate(L)):
    if X<j:
        count=i+1
        break
if count==0:
    count=len(L)+1
print(count)

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

Solution (Python):
import numpy as np
n, x = map(int, input().split())
ls = []
count = 1
pos = 0
for l in map(int, input().split()):
    pos += l
    if (pos) > x:
        break
    else:
        count += 1
print(count)

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

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])
    if d[i] > x :
        print(len(d) - 1)
        exit()
print(len(d))

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

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

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

print(c)