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):
numList1 = list(map(int, input().split()))
numList2 = list(map(int, input().split()))
add = 0
result = 1
cood = []
for i in range(0, len(numList2)):
    add += numList2[i]
    cood.append(add)
for i in cood:
    if i <= numList1[1]:
        result += 1
    else:
        continue
print(result)

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

sum = 0
ans = 0

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

print(ans+1)

Solution (Python):
import sys

n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=[0]
num=0

for i in range(n):
  num+=l[i]
  ans.append(l[i])

  if num==x:
    print(len(ans))
    sys.exit()
    
  elif num>x:
    print(len(ans)-1)
    sys.exit()
    
print(len(ans))

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

print(counter)

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

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

SUM = 0
cnt = 1
for i in l:
    SUM += i
    if SUM > x:
        print(cnt)
        exit()
    cnt += 1
else:
    print(cnt)

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

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

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

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

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

ans = 0

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

print(ans)

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline









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

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

print(ans)

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

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

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

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

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

D = 0
cnt = 0
while D <= X and cnt <= N:
    if cnt != N:
        D += A[cnt]
    cnt += 1

print(cnt)

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

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

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

def main():
    N, X = list(map(int,readline().split()))
    L = map(int,readline().split())
    sum = 0
    cnt = 1
    for l in L:
        sum += l
        if sum <= X:
            cnt += 1
    print(cnt)

    return

if __name__ == '__main__':
    main()

Solution (Python):
n,x=map(int,input().split())
L=[int(_) for _ in input().split()]
S_L=[0]
count=1
for i in range(n):
    S_L.append(S_L[-1]+L[i])
    if S_L[-1]<=x:
        count+=1
    else:
        print(count)
        break
else:print(n+1)

Solution (Python):
n, x, *l = map(int, open(0).read().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 = list(map(int, input().split()))

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

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

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

print(ans)

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

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

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

import numpy as np

arr = [0]

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


arr = np.array(arr)

ans = len(arr[arr<=X])

print(ans)

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

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

n,x=MI()
ls=LI()
dp=[0 for i in range(n+1)]
for i in range(n):
    dp[i+1]=dp[i]+ls[i]

count=0
for d in dp:
    if d<=x:
        count+=1
print(count)

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

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

print(ans)

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

ans = 0
new_list = [0]
for i in range(n[0]):
  ans = ans + m[i]
  if ans <= n[1]:
    new_list.append(ans)
  elif ans > n[1]:
    break
    
print(len(new_list))

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

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

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

for i in range(len(L)):
  ans.append(ans[i]+L[i])
  
print(len([a for a in ans if a<=x]))

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

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

x = 0
number_of_bounds = 0
for _i, Li in enumerate(L):
    number_of_bounds = _i + 1
    x += Li
    if x > X: break

if x <= X:
    number_of_bounds += 1

print(number_of_bounds)

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

i=0
A=[0]

while i<N:
    if A[i]+L[i]<=X:
        A.append(A[i]+L[i])
        i+=1
    else:
        break

print(len(A))

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

bound = []
for _ in range(N+1):
  bound.append(0)

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

ans = 0

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

print(ans)

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

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

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

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

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

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

Solution (Python):



from sys import stdin, stdout

n, x = map(int, stdin.readline().split())
l = list(map(int, stdin.readline().split()))
coordinates = [0]
for i in range(1, n + 1):
    next_coordinate = coordinates[i - 1] + l[i - 1]
    if next_coordinate > x:
        break
    coordinates.append(next_coordinate)
stdout.write("%d\n" % len(coordinates))

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













readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, x = list(map(int, readline().split()))
    l = list(map(int, readline().split()))
    d = 0

    for i in range(n):
        d += l[i]
        if d > x:
            print(i + 1)
            sys.exit()

    print(n + 1)


if __name__ == '__main__':
    main()

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


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

print(d_count)

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

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

Solution (Python):
p,q= input().split()
a,b =(int(p), int(q))
L_list = input().split()
L_list_int = []
count = 0
for i in range(a):
    L_list_int.append(int(L_list[i])) 

for i in range(a + 1):
    if sum(L_list_int[:i]) <= b:
        count += 1
    else:
        break
print(count)

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

Solution (Python):
n, x = map(int, input().split())
l = list(int(i) for i in 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()))
b=0
cnt=0
for i in l:
  b+=i
  cnt+=1
  if b>x:
    print(cnt)
    exit()
print(n+1)

Solution (Python):

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

Solution (Python):

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

x = 0
ans = 1

for l in L:
    x+= l
    if x > X:
        break
    ans += 1
print(ans)

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

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

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

bouncing_cnt_in_range = 1
current_ball_position = 0
for next_step in L:
  current_ball_position += next_step
  if current_ball_position <= X:
    bouncing_cnt_in_range += 1
  else:
    break
  
print( bouncing_cnt_in_range )

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

print(ans)

Solution (Python):
n, x = [int(_) for _ in input().split()]
L = [int(_) for _ in input().split()]
res = 1
d = 0
for l in L:
  d += l
  res += (d <= x)
print(res)

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()))
p=[0]*(n+1)
c=1
for i in range(n):
  p[i+1]=p[i]+l[i]
  if p[i+1]<=x:
    c+=1
print(c)

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

print(count)

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

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N, X = input_nums()
    L = input_nums()
    s = 0
    cnt = 1
    for i in range(N):
        s += L[i]
        if s <= X: cnt += 1
    print(cnt)

if __name__ == '__main__':
    main()

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

Solution (Python):
from bisect import bisect_right
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])
cnt = bisect_right(d, x)
print(cnt)

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

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

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

print(ans)

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

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

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

print(ans)

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,x=INTM()
    l=LIST()
    ct=1
    temp=0
    for i in range(n):
        temp+=l[i]
        if temp<=x:
            ct+=1
        else:
            break
    print(ct)
if __name__ == '__main__':
    do()

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

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

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

print(count)

Solution (Python):
import sys

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

for i in range(n):
    if sum(l_list[:i+1]) > x:
        print(i+1)
        sys.exit()

print(n+1)

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

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

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,x = iim()
L = iil()
ans = 1
dis = 0
for item in L:
    dis += item
    if dis <= x:
        ans += 1
    else:
        break
print(ans)

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

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

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

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


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

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

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

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

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

D=0
count=1
while D<=X and count<=N+1:
    if count != N+1:
       D=D+L[count-1] 
    count+=1

print(count-1)

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

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

Solution (Python):

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

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

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

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

print(cnt)

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 = list(map(int, input().split()))
ans = 1
d = 0

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

print(min(ans, n + 1))

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

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

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

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

count = 1
p = 0

for l_i in l:
    p += l_i
    if p <= x:
        count += 1
    else:
        break

print(count)

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

Solution (Python):
N, X = 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]
    if D[i+1] <= X:
        cnt += 1

print(cnt + 1)

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

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

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

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

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

print(ans)

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

tmp = 0
cnt = 1

for i in range(N):
    tmp += L[i]

    if(tmp <= X):
        cnt += 1
print(cnt)

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

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

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

    if d <= x:
        num = num + 1

print(num)

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

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

print(min(N+1, cnt))

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

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

Solution (Python):












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

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

ans = [0]
junpzahyou = 0
i = 1
for i in arrL:
    junpzahyou += i
    if junpzahyou <= x:
        ans += [junpzahyou]
    else:
        continue

print(len(ans))

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

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

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

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

print(cnt)

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

Solution (Python):
f=lambda:map(int,input().split())
_,x=f();c,d=1,0
for i in f():
  d+=i
  if d<=x:c+=1
print(c)

Solution (Python):
f=lambda:map(int,input().split())
_,x=f();c,d=1,0
for i in f():
  d+=i
  if d>x: break
  c+=1
print(c)

Solution (Python):

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

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

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

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








e = 1


for i in L:
    if d + i <= X:
        d += i
        e += 1
    else:
        break


print(e)

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

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

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

tmp = 0
for i in range(n):
    tmp += l_list[i]
    if tmp > x:
        break

if tmp <= x:
    print(101)
else:
    print(i+1)

Solution (Python):
def solve():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    l = [0]
    d = 0
    for a in A:
        d += a
        l.append(d)
    c = 0
    for a in l:
        if a <= M:
            c += 1

    return c

print(solve())

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

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

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

print(cnt)

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

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

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


ans = bisect.bisect_right(x,k)
print(ans)

Solution (Python):
n,x = map(int,raw_input().split())
l = map(int,raw_input().split())
d1=0
bou = 1
for i in xrange(n):
    d1 += l[i]
    
     
    if d1 > x:
        break
    else:
        bou += 1
print bou

Solution (Python):
import itertools
N , M = (map(int , input().split()))
A = list(map(int , input().split()))
A.insert(0,0)
cumsum = list(itertools.accumulate(A))
count = 0
for i in cumsum:
    if i <= M:
        count += 1
print(count)

Solution (Python):


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


D=0
ans = len(L_list) + 1

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

print(cnt)

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

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

Solution (Python):
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, X = lr()
L = np.array([0] + lr())
Lcum = L.cumsum()
i = np.searchsorted(Lcum, X, side='right')
print(i)

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())
k=[int(i) for i in input().split()]
s=0
count=1
for i in range(n):
    s+=k[i]
    if s<=x:
        count+=1
    
print(count)

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, *l = map(int, open(0).read().split())
s, c = 0, 0
for i in l:
    s += i
    c += 1
    if s > x:
        print(c)
        exit()
print(n + 1)

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

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