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

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

cnt = 0
for x in acc:
  if x <= X:
    cnt += 1
print(cnt)

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

  if a>x:break
if x<a:print(i+1)
else:print(i+2)

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

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

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

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

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

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

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

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

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

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

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

print(count)

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

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

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

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

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

Solution (Python):
import itertools
N, X = map(int, input().split())
l = list(map(int, input().split()))
l.insert(0,0)
l_acc = list(itertools.accumulate(l))
answer = [x for x in l_acc if x<=X]
print(len(answer))

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
    else:
        break
print(cnt)

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

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

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

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

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

ans=1
s=0

for ll in l:
    s+=ll
    if s <= x:
        ans+=1

print(ans)

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

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


count = 0
for idx in range(N):
    count += nums[idx]

    if count > X:
        idx += 1
        break
else:
    idx += 2

print(idx)

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

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

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

print(count)

Solution (Python):
n,k=map(int, input().split(' '))
a=list(map(int, input().split(' ')))
ans,s=0,0
for i in a:
  if s<=k: ans+=1
  else: break
  s+=i

if s<=k: ans+=1
print(ans)

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

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

for li in l:
  c+=li
  if c <= x:
    cnt+=1
    
print(cnt)

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

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

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

cnt = 1
current = 0
for z in l:
    if current + z <= x:
        cnt += 1
        current += z
    else:
        break

print(cnt)

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

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

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

print(ans)

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

plot=0
cnt=1

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

print(cnt)

Solution (Python):

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

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

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

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

    
for i in range(len(L)):
    a += L[i]
    if a <= X:
        cnt += 1

print(cnt)

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

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

d = 0
c = 0

for i in l:
	d += i

	if d <= x:
		c += 1

print(c+1)

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

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

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

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

print(cnt)

Solution (Python):
import itertools
import bisect

N, X=map(int, input().split())
L=list(map(int, input().split()))
print(bisect.bisect_right(list(itertools.accumulate(L)), X)+1)

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()))
bound_count = 1
d = 0

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

print(bound_count)

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

ans = 1
current = 0

for i in range(N):
  current += L_list[i]
  if current <= X:
    ans += 1
    
print(ans)

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

Bounds = [0]

for i in range(N):
    Bounds.append(Bounds[i] + L_i[i])

count = 0

for i in Bounds:
    if i <= X:
        count += 1

print(count)

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

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

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

Solution (Python):

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

Solution (Python):
def main():
  n, x, *ls = map(int, open(0).read().split())
  d=0
  cou=1
  for l in ls:
    d += l
    if d <= x:
      cou+=1
    else:
      return(cou)
  return n+1
if __name__ == '__main__':
  print(main())

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

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

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

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

bound_count = 1
distance = 0
for idx in range(n):
  if distance + l[idx] > x:
    break
  distance = distance + l[idx]
  bound_count += 1
print(bound_count)

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

cnt = 1
sum = 0

for i in list:
    sum += i
    if sum <= X:
        cnt += 1

print(cnt)

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

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

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

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

Solution (Python):
def LI():
  return [int(s) for s in input().split()]

N,X = LI()
L_s = LI()

D = [0]*(N+1)

count = 1

for i in range(1,N+1):
  D[i] = D[i-1] + L_s[i-1]
  if D[i] <= X:
  	count += 1
  
print(count)

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

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

Solution (Python):
def main():
    n,x = map(int, input().split())
    num_list = list(map(int, input().split()))

    sum = 0
    ans = 1

    for i in num_list:
        sum += i
        if sum <= x:
            ans += 1

    print(ans)

if __name__ == '__main__':
    main()

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

s = 0
ans = 1

for i in l:
  s += i
  if s <= x:
    ans += 1
  else:
    break

print(ans)

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

Solution (Python):
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))

import numpy as np

n, x = mi()
l = li()

hane = [0]
for i in range(n):
    d = hane[-1]
    hane.append(int(d+l[i]))

hane = np.array(hane)
ans = np.count_nonzero(hane <= x)

print(ans)

Solution (Python):
def calcBoundCount(rangex, lstL):
    d = 0
    for i in range(0, len(lstL)):
        d = d + lstL[i]
        if rangex < d:
            return i + 1
    return len(lstL) + 1
 
N, X = map(int, input().split())
lstL = list(map(int, input().split()))
 
count = calcBoundCount(X, lstL)
print((count if count <= N+1 else N+1))

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

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

print(count+1)

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

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

Solution (Python):
import sys

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

D = 0

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

print(N+1)

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

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

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

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

Solution (Python):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n, x = na()
l = na()
d = [0 for _ in range(n + 1)]

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

print(res)

Solution (Python):
def main():
    N,X = map(int,input().split())
    L = list(map(int,input().split()))
    jump = [0]*(N**4)
    jump[0] = 1
    d = 0
    for i in range(N):
        d += L[i]
        jump[d] = 1
    
    print(sum(jump[:X+1]))
    


if __name__=="__main__":
    main()

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

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

d = [0] * (n + 1)

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

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

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


if L[0]>X:
    print(1)
else:
    D=0
    i=0
    count=1
    while D<=X and i<=N-1:
        if D+L[i]<=X:
            D+=L[i]
            i+=1
            count+=1
        else:
            break
    print(count)

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

d = [0]
for i in range(len(l)):
   d.append(d[-1]+l[i])

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

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

bounce = [0]
d = 0

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

count = 0
for i in bounce:
    if i <= x:
        count += 1

print(count)

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

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

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


print(sum(i <= x for i in d))

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

for l in L:
    D = D + l

    if D > X:
        break

    ans += 1

print(ans)

Solution (Python):




def solve(N, X, L):
    ans = 1
    now = 0
    for ll in L:
        now += ll
        if now <= 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 = list(map(int, input().split()))

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

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

Solution (Python):

n,x=map(int, input().split())
l=[int(i) for i in 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()))

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

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys


import itertools

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

Lcum = itertools.accumulate(L)

answer = sum(i <= X for i in Lcum)
print(answer + 1)

Solution (Python):
import itertools

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

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

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

    res = 0
    cnt = 1
    for i in l:
        res += i
        if res <= x:
            cnt += 1
        else:
            print(cnt)
            return
    print(cnt)

if __name__ == '__main__':
    main()

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 = [int(_) for _ in input().split()]
L = [int(_) for _ in input().split()]

cnt = 1
dn = 0
for n in range(0, N):
    dn += L[n]
    if dn <= X:
        cnt += 1
print(cnt)

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

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

def main():
    n, x = map(int, input().split())
    l = tuple(map(int, input().split()))

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

if __name__ == '__main__':
    main()

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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

print(sum([d <= X for d in Ds]))

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

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

ans = 0
for d in Ds:
    if d <= X:
        ans += 1
print(ans)

Solution (Python):
import numpy as np

n, x = [int(_) for _ in input().split()]
l = np.cumsum(np.array([int(_) for _ in input().split()]))
print(sum([i <= x for i in l])+1)

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

Solution (Python):
n, x = map(int, input().split())
l_list = list(map(int, input().split()))
where = 0
count = 1
for l in l_list:
    where += l
    if where > x:
        print(count)
        exit()
    count += 1
print(count)

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

d = 0
cnt = 0
for i in range(n):
    if d <= x:
        cnt += 1
    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 = [sum(L[:i]) for i in range(N+1)]
print(sum(i <= X for i in d))

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

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

print(ans)

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

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

Solution (Python):
N, X, *L = map(int, open(0).read().split())

c = 1
s = 0
for l in L:
    s += l 
    if s <= X:
        c += 1
    else:
        break

print(c)

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

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])
ans = 0
for i in d:
    if i <= x:
        ans += 1

print(ans)

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

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



for s in pref_sum:
    if s <= 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+1)]
for i in range(1, N+1):
    D[i]=(D[i - 1] + L[i-1])
    
count = 0
for value in D:
    if value <= X:
        count += 1

print(count)

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

count = 1
dis = 0

for i in range(n):
  dis += l[i]
  count += 1
  if dis == x:
    print(count)
    break
  elif dis > x:
    print(count-1)
  elif count == (n+1):
    print(count)
  else:
    continue
  break

Solution (Python):
n,a=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<=a:
    cnt+=1
  else:
    break
print(cnt)

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

i = 0
while d <= x and i <= n:
  if i < n:
    d += l[i]
  i += 1
print(i)

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 = D + L[i]
      if D <= X:
        ans+=1
        
    return ans
    
if __name__ == '__main__':
    print(main())

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

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

D = [0]
for l in L:
  d = D[-1] + l
  if d <= X:
    D.append(d)
  else:
    break

print(len(D))

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

print(ans)

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

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

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

for i in range(n+1):

    d.append(sum(l[:i+1]))

for i in range(n+1):

    if d[i]<=x:
        cnt += 1


print(cnt)

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

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

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

Di = list()
for i in range(n+1):
    if i == 0:
        Di.append(0)
    else:
        Di.append(Di[-1] + Ls[i-1])
    
cnt = 0
for i in range(len(Di)):
    if Di[i] <= x:
        cnt += 1
print(cnt)

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

Solution (Python):
from itertools import accumulate


N, X = [int(i) for i in input().split()]
L = [int(i) for i in input().split()]
L_cumsum = accumulate(L)
ans = len([l for l in L_cumsum if l <= X]) + 1
print(ans)

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

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

if sum(l)<=x:
  print(n+1)
  exit()

i=0
d=0
while d<=x:
    d+=l[i]
    i+=1
print(i)

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

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

Solution (Python):
import numpy as np
N, X = map(int, input().split())
L = np.array(list(map(int, input().split())))
L = np.append(0, L)
print(np.count_nonzero(L.cumsum() <= X))

Solution (Python):
N, *L,  = [list(map(int, s.split())) for s in open(0)]
L = L[0]
idx = 0
cnt = 1

for l in L:
    idx += l
    if idx <= N[1]:
        cnt += 1
print(cnt)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,x = LI()
l = LI()

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

Solution (Python):
from itertools import accumulate
from operator import add

n,x=map(int,input().split())
lst=[0]
lst.extend([int(i) for i in input().split()])

lst2=list(accumulate(lst,add))
print(len([i for i in lst2 if i<=x]))

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

Solution (Python):


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

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

print(n+1)

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

zahyos = [0]
for i, bound in enumerate(bounds):
    zahyo = zahyos[i] + bound
    zahyos.append(zahyo)
    
cnt = 0
for num in zahyos:
    if num <= X:
        cnt += 1
    
print(cnt)