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(x) for x in input().split()]

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

Solution (Python):
def judge(x):
  return 1 if x <= X else 0

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
D = [0] * (N + 1)
for n in range(1, N + 1):
  D[n] = D[n - 1] + L[n - 1]
print(list(map(judge, D)).count(1))

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

c = 0
for i, jump in enumerate(l):
    c += jump
    if c > x:
        print(i + 1)
        break
    elif i == n - 1:
        print(n + 1)

Solution (Python):
N, X = map(int,input().split(" "))
Ls = []
for i in input().split(" "):
  Ls.append(int(i))
Ds = [0]*(N+1)
cnt = 0
for i in range(1,N+1):
  Ds[i] = Ds[i-1] + Ls[i-1]
  if Ds[i] <= X: cnt += 1
print(cnt+1)

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

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

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

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

total = 0

for lc,l in enumerate(list_l):
    total += l
    if (total > x):
        break

if (total <= x):
    lc += 1
print(lc + 1)

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

for i in range(1, N):
    if i == 1:
        L[i] = L[i] + L[0]
    else:
        L[i] = L[i] + L[i-1]
L.append(0)
for i in L:
    if i <= X:
        ans += 1
print(ans)

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

Solution (Python):


import sys
input = sys.stdin.readline

def io_generator():
	return input()



def main(io):
	n,x = map(int, io().split())
	ll= list(map(int, io().split()))
	pos=0
	if n > x:
		return 0
		
	cc=1
	for l in ll:
		pos += l
		if pos > x:
			break
		cc+=1
			
	return cc



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

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

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

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

Solution (Python):
n,x = map(int,input().split())
li = list(map(int,input().split()))
cnt = 0
total = 0
for i in li:
    total += i
    cnt += 1
    if total > x:
        break
if sum(li) <= x:
    print(len(li) + 1)
else:
    print(cnt)

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

for i in range(len(list)):
    bound_list.append(list[i]+bound_list[i])
    if bound_list[len(bound_list)-1]>x:
        print(i+1)
        flag=1
        break

if flag == 0:
    print(n+1)

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

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

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

print(ans)

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


N,X=map(int,input().split())
L = list(map(int,input().split()))
sums=[0]*(N+1)
c=0
for i in range(1,N+1):
  sums[i] = sums[i-1] + L[i-1]

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

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

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

print(ans)

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

count = 1
res = 0
for l in l_list:
    res += l
    if res <= x:
        count += 1
    else:
        break
print(count)

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

cnt = 0
d = 0

for i in range(1,n+1):
    D = d + L[i-1]
    
    if D <= x:
        cnt+=1
        d=D
    else:
        d=D
        
print(cnt+1)

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

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

Solution (Python):
N,X = map(int,input().split(" "))
L_l = map(int,input().split(" "))
pos = 0
for i,L in enumerate(L_l):
    pos += L
    if(pos>X):
        print(i+1)
        exit(0)

print(i+2)

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

d = 0
cnt = 1
for i in range(1,n+1):
  d = d + L[i - 1]
  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
dlist=[]
dlist.append(0)
for i in range(1,n+1):
    d=d+l[i-1]
    if d <= x:
        dlist.append(d)
print(len(dlist))

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

count = 1
current = 0
for l in ls:
    current += l
    if x >= current:
        count += 1
    else:
        break
print(count)

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

Solution (Python):
n,x = map(int,input().split())
li = list(map(int,input().split()))
cnt = 0
total = 0
for i in li:
    total += i
    cnt += 1
    if total > x:
        break
if sum(li) <= x:
    print(len(li) + 1)
else:
    print(cnt)

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

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

lenge = 0
counter = 0
ans_list = [0]
tmp = 0
for i in range(len(num_list)):
    tmp += num_list[i]
    ans_list.append(tmp)


for s in range(len(ans_list)):
    if ans_list[s] <= X:
        counter += 1
    
    else:
        break

print(counter)

Solution (Python):
NX = [int(i) for i in input().split()]
L = [int(i) for i in input().split()]
L.insert(0,0)
answer = 0
sum = 0
for i in range(len(L)):
    sum += L[i]
    if(sum > NX[1]):
        break
    else:
        answer += 1
print(answer)

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

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

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

d = 0
cnt = 1
for i,l in enumerate(l_list):
    d += l

    if d > X:
        break
    cnt += 1



    
print(cnt)

Solution (Python):
def main():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    D = 0
    i = 0
    while True:
        D += L[i]
        i += 1
        if D > X:
            print(i)
            return
        if i == N:
            print(i+1)
            return

if __name__ == '__main__':
    main()

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

now = 0
i = 0
while i < N:
    now += L[i]
    if now <= X:
        i += 1
    else:
        break

print(i + 1)

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

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

Solution (Python):
nx = input().split()
n = int(nx[0])
x = int(nx[1])
ls = input().split()
ls = [int(num) for num in ls]

def main():
    c = 1
    ds = [0]
    for i in range(1,n+1):
        nxt = ds[i-1] + ls[i-1] 
        if nxt > x:
            print(c)
            return
        ds.append(nxt)
        c += 1
    print(c)
    


if __name__ == '__main__':
    main()

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

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

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

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

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

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

count = 1
zahyo = 0

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

print(count)

Solution (Python):
import numpy as np


def solve():
    n, x = [int(i) for i in input().split()]
    l = np.array([int(i) for i in input().split()])

    if x == 0:
        print(0)
        exit(0)

    d = 0
    ans = 1

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

    print(ans)


if __name__ == '__main__':
    solve()

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

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


print(s)

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

print(cnt)

Solution (Python):

"""
AtCoder A
"""

import sys, math, random
import numpy as np







 
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    N, X = list(map(int,input().split()))
    L=LI()
    L1=0
    out=1
    for l in L:
        D=L1+l
        
        if D<X+1:
            out+=1
        L1=D
    print(out)
    
if __name__ == "__main__":
    main()

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    tokens = lines[0].split(" ")
    n = int(tokens[0])
    x = int(tokens[1])
    ls = [int(l) for l in lines[1].split(" ")]

    return (n, x, ls)


def solve(n, x, ls):

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


    return count


def main():
    

    print("%s" % solve(*parse_input()))



if __name__ == '__main__':

    main()

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

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

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

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

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

print(len(ans))

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

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

count = 1
point = 0

while point <= X and count <= N:
    point += List[count-1]
    if point <= X:
        count += 1

print(count)

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

Solution (Python):

N, X = [int(n) for n in input().split()]
L = [int(n) for n in input().split()]
now = 0
ans = 1
for i in range(len(L)):
    now += L[i]
    if now > X:
        break
    ans += 1
print(ans)

Solution (Python):
n, x=map(int, input().split())
L=[i for i in map(int, input().split())]
counter=1
place=0
for i in range(n):
    place+=L[i]
    if place<=x and i!=n-1:
        counter+=1
    elif place>x:
        print(counter)
        break
    elif place<=x and i==n-1:
        counter+=1
        print(counter)

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

print(n+1)

Solution (Python):
from sys import stdin
import numpy as np

N, X = [int(x) for x in stdin.readline().rstrip().split()]
L = [int(x) for x in stdin.readline().rstrip().split()]

count = 1
dn = 0
dn_1 = 0

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

print(count)

Solution (Python):
N, X = map(int,input().split())
d_list = []
l_list = input().split()
d_list.append(0)
now_d = 0
for l in l_list:
  now_d += int(l)
  d_list.append(now_d)
ans = [i for i in d_list if X>=i ]
print(len(ans))

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

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


main()

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

d = 0
cnt = 1
for l in distances:
  d += l
  if d <= x:
    cnt += 1
  else:
    break

print(cnt)

Solution (Python):
def main():
    n,x = map(int,input().split(' '))
    l = list(map(int,input().split(' ')))
    distance = 0
    cnt = 1
    for i in l:
        distance +=i
        if distance <= x:
            cnt += 1
        else:
            break
    print(cnt)
if __name__=='__main__':
    main()

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

bound = [0]
ans = 1

for i in range(n):
    bound.append(bound[i] + l[i])
    ans += 1
    if bound[-1] == x:
        break
    elif bound[-1] > x:
        ans -= 1
        break

print(ans)

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

Solution (Python):

n, x = list(map(int, input().split()))
l  = list(map(int, input().split()))
s = 0
l2 = [0]
c = 1
for _l in l:
    s += _l
    if s > x:
        break
    else:
        c += 1
print(c)

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 = D[i-1] + L[i-1]
  if d <= X:
    cnt = cnt + 1
  D.append(d)

print(cnt)

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

p = 0
c = 1
for s in l:
    p += s
    if p <= x:
        c += 1
    
print(c)

Solution (Python):
import numpy as np

n, x = map(int, input().split())
l = list(map(int, input().split()))
result = [0]
for i in l:
    result.append(result[-1] + i)

print((np.array(result) <= x).sum())

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

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

if cnt <= X:
    ans += 1

print(ans)

Solution (Python):



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

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

tmp = 0
for il,i in zip(l,range(len(l))):
    tmp+=il
    if tmp > x:
        i-=1
        break
    
if l[0] <= x:
    print(i+2)
else:
    print(0)

Solution (Python):
if __name__ == "__main__":
  NX = input().split(" ")
  LN = input().split(" ")
  
  sum = 0
  count = 1
  for i in range(int(NX[0])):
    sum = sum + int(LN[i])
    if sum <= int(NX[1]):
      count += 1
  print(count)

Solution (Python):
N, X = [int(i) for i in input().split()]
ls = [int(i) for i in input().split()]
d = 0
list = [0]
for l in ls:
    d += l
    list.append(d)

print(len([i for i in list if i <= X]))

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

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

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N, X = LI()
    L = LI()
    cur_x = 0
    cnt = 1
    for l in L:
        cur_x += l
        if cur_x > X:
            break
        cnt += 1
    print(cnt)
main()

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

jump = 0
high.append(jump)

for i in range(N):
  jump = jump + lst[i]
  if jump <= X:
    high.append(jump)

print(len(high))

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

L = [int(i) for i in input().split()]

Distance = 0
Bound_times = 1

for j in range(N):
    Distance = Distance + L[j]
    if Distance <= X:
        Bound_times += 1
    else:
        break

print(Bound_times)

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

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

print(k)

Solution (Python):
N,X = [int(x) for x in input().split()]
data_jump = [int(x) for x in input().split()]
count = 1
sum_dis = 0
for i in range(N):
    sum_dis += data_jump[i]
    if sum_dis > X:
        break
    count += 1
print(count)

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

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

res = 0
for c in D:
    if c <= X:
        res += 1

print(res)

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

ans = 1
ct = 0
D = 0
while True:
    D += L[ct]
    if D <= X:
        ct += 1
        ans += 1
    else:
        break
    if ct > N - 1:
        break

print(ans)

Solution (Python):
def abc():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    cnt = 1
    pre = 0
    for _l in l:
        tmp = pre + _l
        if tmp > x:
            break
        pre = tmp
        cnt += 1
    print(cnt)


abc()

Solution (Python):







import sys
sys.setrecursionlimit(10**7)
from itertools import combinations, permutations 
from math import factorial
def combinations_count(n, r):
    
    
    
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot
    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
    return result
def combination_with_repetition_count(n, r):
    return combinations_count(n + r - 1, r)
from collections import deque, Counter 
from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
from copy import deepcopy, copy 
from operator import itemgetter 
from functools import reduce
from fractions import gcd 
def gcds(numbers):
    return reduce(gcd, numbers)
def lcm(x, y):
    return (x * y) // gcd(x, y)
def lcms(numbers):
    return reduce(lcm, numbers, 1)



INF = 10 ** 18
MOD = 10 ** 6 + 3
modpow = lambda a, n, p = MOD: pow(a, n, p) 
def modinv(a, p = MOD):
    
    
    return modpow(a, p-2, p)
def modinv_list(n, p = MOD):
    if n <= 1:
        return [0,1][:n+1]
    else:
        inv_t = [0,1]
        for i in range(2, n+1):
            inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
        return inv_t
def modfactorial_list(n, p = MOD):
    if n == 0:
        return [1]
    else:
        l = [0] * (n+1)
        tmp = 1
        for i in range(1, n+1):
            tmp = tmp * i % p
            l[i] = tmp
        return l
def modcomb(n, k, fac_list = [], p = MOD):
    
    
    from math import factorial
    if n < 0 or k < 0 or n < k: return 0
    if n == 0 or k == 0: return 1
    if len(fac_list) <= n:
        a = factorial(n) % p
        b = factorial(k) % p
        c = factorial(n-k) % p
    else:
        a = fac_list[n]
        b = fac_list[k]
        c = fac_list[n-k]
    return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
def modadd(a, b, p = MOD):
    return (a + b) % MOD
def modsub(a, b, p = MOD):
    return (a - b) % p
def modmul(a, b, p = MOD):
    return ((a % p) * (b % p)) % p
def moddiv(a, b, p = MOD):
    return modmul(a, modpow(b, p-2, p))




    
    

    
    
    
    
    

    
    





r = lambda: sys.stdin.readline().strip() 
R = lambda: list(map(int, r().split())) 
Rmap = lambda: map(int, r().split())


n, x = R()
L = R()
tmp, count = 0, 0
for l in L:
    tmp += l
    count += 1
    if tmp > x:
        print(count)
        exit()
print(n+1)

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


D = 0
out = 0
end = False
for L in Ls:
    out += 1 
    D = D + L
    if D > X:
        end = True
        break

if end == False:
    out += 1

print(out)

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

l = 0
for i in range(N):
    l += L[i]
    num.append(l)
for i in num:
    if i <= X:
        ans += 1
print(ans)

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n,x = na()
L = na()
ans = 0
a = 0

for i in L:
    ans+=1
    a+=i
    if a > x:
        break
    if ans == n:
        ans+=1

print(ans)

Solution (Python):

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

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


curpos = 0
times = 1
while curpos <= x and times < n+1:
    curpos += Ln[times-1]
    if curpos>x:
        break
    
    times += 1


print(times)

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

D = 0
counter = 1
for L in L_list:
    D += L
    if D <= x:
        counter += 1
    else:
        break

print(counter)

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

bound = 1
a = 0
for i in range(len(d)):
  a += d[i]
  if a > X:
    break
  bound += 1
  
print(bound)

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

print(count+1)

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

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

Solution (Python):
import numpy as np

N, X = [int(i) for i in input().split()]
l_l = [int(i) for i in input().split()]

d1=0
l_d = [d1]
for i in range(N):
    l_d.append(l_d[i]+l_l[i])
    
arr_d = np.array(l_d)
print(len(arr_d[arr_d<=X]))

Solution (Python):










import numpy as np
import math
import copy

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

bound = 1
pos = 0

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

print(bound)

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

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [N, X] = string_to_int(inputs[0])
    L = string_to_int(inputs[1])

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

        if step <= X:
            count += 1
        else:
            break
    return count


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)

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

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

ans = 1
c = 0

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

print(ans)

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

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

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

Solution (Python):
x, y = list(map(int, input().split()))
bola = 0
bola1 = 0
quick = 1

l1 = input().split()

for c in range(x):
    bola1 = int(l1[c])

    bola += bola1

    if bola <= y:
        quick += 1

print(quick)

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

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

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

Solution (Python):

import sys























input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  
    X = int(next(tokens))  
    L = [ int(next(tokens)) for _ in range(N) ]  

    
    tmp = 1
    D = 0
    i = 0
    if sum(L) <= X:
        print(N + 1)
        sys.exit()
    while True:
        D += L[i]
        i += 1
        tmp += 1
        if D > X:
            break
    print(tmp-1)

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

    if i == n-1:
        print(n+1)

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

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

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

D = 0
Ds = [0]
for i in Ls:
    
    res = D + i
    Ds.append(res)
    D = res

res_list = [i for i in Ds if i <= X]


print(len(res_list))

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

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

for i in l:
    ans += 1 if d <= x else 0
    d += i
print(ans)

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

S = 0
C = 0
for i in range(len(L)):
    S += L[i]
    if S <= X:
        C += 1

print C+1

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
else:
    print(N+1)