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):
inputs = list(map(int, input().split()))
N,X = inputs
li = list(map(int, input().split()))
bound=1
length=0
for i in li:
    length += i
    if length > X:
        break
    bound +=1
print(bound)

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

ans = 1
prev = 0
for i in range(len(a)):
    prev += a[i]
    if prev > x:
        break
    else:
        ans += 1
print(ans)

Solution (Python):


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

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

print(ans)

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

s = 0
count = 1
for l in li:
  s += l
  if s > x:
    break
  count += 1
print(count)

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

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

Solution (Python):
def solve():
    N, X = [int(_) for _ in raw_input().split()]
    L = [int(_) for _ in raw_input().split()]
    ans = 1
    D = 0
    for i in range(N):
        D += L[i]
        if D > X:
            break
        else:
            ans += 1
    print ans

if __name__ == '__main__':
    solve()

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

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

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

Solution (Python):

n, x = map(int, input().split())
li = list(map(int, input().split()))
d = [0]
for a in li:
    d.append(d[-1] + a)
ans = sum(a <= x for a in d)
print(ans)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

N, X = LI()
L = LI()

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

Solution (Python):



NX = input()
N = int(NX.split(' ')[0])
X = int(NX.split(' ')[1])

L = map(int, input().split(' '))
cnt = 0
result = 1
for i in L:
    cnt += i
    if cnt <= X:
        result += 1

print(result)

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

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

print(ans)

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

Solution (Python):



def f(N, X, L):
    d = 0

    for i, l in enumerate(L):
        d += l
        if d > X:
            return i+1

    return N+1


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

    print(f(N, X, L))



if __name__ == '__main__':
    main()

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

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

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

print(bound)

Solution (Python):
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)

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

count = 1
pos = 0

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

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

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

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

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

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

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

for i in range(len(l)):
    t += l[i]
    if x < t:
        print(i + 1)
        c += 1
        break

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
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 II(): return int(sys.stdin.readline())
def SI(): return input()
from collections import defaultdict

n, x = LI()
ls = LI()

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

print(ans)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    x, a = LI()
    if x < a:
        print(0)
    else:
        print(10)
    return


def B():
    n, x = LI()
    L = LI()
    ans = 0
    c = 1
    for i in L:
        ans += i
        if ans <= x:
            c += 1
            continue
        break
    print(c)
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    B()

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

CUMSUM = []
c = 0
for i in L:
    if c <= X:
        CUMSUM.append(c)
        c += i
if c <= X:
    CUMSUM.append(c)

print(len(CUMSUM[:X]))

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

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

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

current = 0
result = 1
for _l in l:
    current += _l
    if current > x:
        break
    result +=1

print(result)

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

n,x = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
temp = 0
counter = 1
for index, value in enumerate(l):
    temp += value
    if temp <= x:
        counter += 1
print(counter)

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

d = [0]*(n+1)
ans = 0

for i in range(0, n+1):
  if i == 0:
    d[i] = 0
  else:
    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 = list(map(int,input().split()))

cnt = 1
wd = 0

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


print(cnt)

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

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

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

now = 0
LL = [now]
for l in L:
    now += l
    LL.append(now)
print(len(list(filter(lambda x:x<=X,LL))))

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

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

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

ans = 1
pos = 0

for _l in l:
  pos += _l
  if pos > x:
    break
  ans += 1

print(ans)

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

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

Solution (Python):
from itertools import accumulate

N, X = map(int, input().split())
AL = [0] + list(accumulate(list(map(int, input().split()))))

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

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

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

jump = 1
d = 0

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

print(jump)

Solution (Python):
n,x = map(int,input().split())
l=map(int,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())
l=[int(j) for j in input().split()]
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)

Solution (Python):
from itertools import accumulate
N, X = map(int, input().split())
L = map(int, input().split())
LA = list(accumulate(L))
C = sum([i <= X for i in LA])
print(C + 1)

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

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

result = 1
pos = 0

L = list(map(int, input().split()))
for i in L:
  pos += i
  if pos <= X:
    result += 1
  else:
    break
print(result)

Solution (Python):
import sys
from collections import Counter, deque, defaultdict





sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7






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

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

if d <= X:
    cnt += 1

print(cnt)

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

print(ans)

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

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

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

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

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

t = 1
d = 0

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

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

D = 0
ans = 1
for l in L:
  D += l
  if D<=X:
    ans += 1
print ans

Solution (Python):
import numpy as np
N,X = [int(i) for i in input().split()]
L = [int(i) for i in input().split()]
POS = [0]
for l in L:
    POS.append(POS[-1] + l)
POS = np.array(POS)
print(np.count_nonzero(POS <= X))

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

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

now = 0
result = 1
for l in L:
    now += l
    if now <= X:
        result += 1

print(result)

Solution (Python):
import sys

N, X = list(map(int, sys.stdin.readline().strip().split(" ")))
L_list = list(map(int, sys.stdin.readline().strip().split(" ")))
d = 0
count = 1

for l in L_list:
    if d + l <= X:
        count += 1
        d += l
    else:
        break

print(count)

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

cur = 0
ans = 1

for hop in hoplist:
	cur += hop
	if cur > x:
		break
	ans += 1
	
print(ans)

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

D = [0] * (N+2)
answer = 1
for n in range(2,N+2):
  D[n] = D[n-1] + L[n-1]
  if D[n] <= X:
    answer += 1
    
print(answer)

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

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

print(count)

Solution (Python):


import math

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

sum_a = 0
cnt = 1
for l in (L_list):
    sum_a += l
    if sum_a > X:
        break
    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:
        count += 1
    else: 
        break

print(count)

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

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

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

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

s = 0
c = 1
for i in l:
  s += i
  if (s > lim):
    break
  c += 1

print(c)

Solution (Python):
n,k=map(int,input().split())
l=list(map(int,input().split()))
l2=[0]
q=0
for i in range(n):
  q+=l[i]
  if q > k: break
  l2.append(0+l[i])

print(len(l2))

Solution (Python):
l = input().split()
N = int(l[0])
X = int(l[1])

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



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

print(N + 1)

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

Solution (Python):

N,X=map(int,input().split())
count=1

L=[]
LL=list(map(int,input().split()))
for i in range(N):
    c=0
    for j in range(i+1):

        c+=LL[j]
    L.append(c)


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

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

Solution (Python):
N, X = list(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
    else:
        break
print(ans)

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

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

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

ans = 1
D = [0] * (N+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 = list(map(int, input().split()))

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

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

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

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

print(ans)

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

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

ans = [0]

d = 0

for i in li:
    d += i
    ans.append(d)
    
cnt = 0

for i in ans:
    if i <= x:
        cnt += 1
    else:
        break
    
print(cnt)

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

zahyo = 0
kaisu = 1
for i in L:
    zahyo += i
    if zahyo <= X:
        kaisu += 1
    else:
        break

print(kaisu)

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

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

Solution (Python):


import sys

n,x = [ int(x) for x in sys.stdin.readline().split() ]
lall= [ int(x) for x in sys.stdin.readline().split() ]

now  = 0
bound= 1
for li in lall:
    now+= li
    if now<=x: bound+=1
    else: break

print( bound )

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
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 II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

def main(): 
    N, X = LI()
    L = LI()
    x = 0
    count = 1
    for i in range(N):
        x += L[i]
        if x > X: break
        count += 1
    print(count)

main()

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

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

Solution (Python):
inp = input()
split_input = inp.split()
n = int(split_input[0])
x = int(split_input[1])
inp = input()
split_input = inp.split()
number = 0
count = 1
for st in split_input:
    l = int(st)
    number += l
    if number > x:
        break
    count += 1
print(count)

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

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

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

Solution (Python):


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

d = 0
count = 0

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

print(count)

Solution (Python):
n,x =map(int,input().split())
l = list(map(int,input().split()))
temp = 0
ans = 0
if x >= 0:
    ans += 1

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

Solution (Python):

import sys


def solve(N, X, L):
    ds = [0] * (N +2)
    for i in range(1, N+1):
        ds[i] = ds[i-1] +   L[i-1]
    print(len([x for x in ds if x<=X]) - 1)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    X = int(next(tokens))  
    L = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, X, L)

if __name__ == '__main__':
    main()

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

current_position = 0
bound_count = 1
for L in nums:
    current_position += L
    if current_position <= X:
        bound_count += 1
print(bound_count)

Solution (Python):
N, X = map(int, input().split(" "))
LList = [int(i) for i in input().split(" ")]
count = 1
temp = 0

for i in LList :
    temp += i
    if temp > X :
        break
    count += 1
print(count)

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

count = 1
total = 0
for l in L:
  total += l
  if total > X:
    break

  count += 1

print(count)

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

count = 1
d = 0
for li in l:
    d += li
    if d <= x:
        count += 1

print(count)

Solution (Python):

import time
import re
import math

def main():
    N,X=map(int,input().split())
    L=list(map(int,input().split()))
    count=0
    num=0
    for a in range(N+1):
        if a>0:
            num=num+L[a-1]
        if num<=X:
            count+=1
    print(count)
start=time.time()
main()

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

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

print(bisect.bisect_right(H, X))

Solution (Python):
import numpy as np
import bisect

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

L_cumsum = np.array(L).cumsum()
ans = 1 + bisect.bisect_right(L_cumsum, X)

print(ans)

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

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

cnt = 1
nowL = 0

for i in range(N) :
    nowL += l[i]
    if nowL <= X :
        cnt += 1
    else :
        break

print(cnt)

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

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

Solution (Python):
from itertools import accumulate

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

B = [0] + L
B = list(accumulate(B))

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

print(cnt)

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    n, x = map(int, input().split())
    l = [int(li) for li in input().split()]
    d = s = 0

    for i in l:
        if d <= x:
            s += 1
        d += i

    if d <= x:
        s += 1

    print(s)




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

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

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

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

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 = list(map(int, input().split()))
L = list(map(int, input().split()))

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

print(cnt)

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

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
ans = 1

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

print(ans)

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

Solution (Python):

N, X = map(int, raw_input().split())
L_arr = map(int, raw_input().split())

over = False
over_i = 0
for i in range(0, N+1):
  if over:
    break
  if i == 0:
    d = 0
  else:
    d = d + L_arr[i-1]
    if d > X:
      over = True
      over_i = i
      break

if over:
  print(over_i)
else:
  print(N+1)

Solution (Python):
N, X = [int(x) for x in input().split()]
L_list = [int(x) for x in input().split()]
d = 0
cnt = 1
for L in L_list:
    d += L
    cnt += (d <= X)
print(cnt)

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

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

Solution (Python):
n, x = [int(item) for item in input().split()]
l = [int(item) for item in input().split()]
bound = 0
cnt = 1
for item in l:
    bound += item
    if bound > x:
        break
    else:
        cnt += 1
print(cnt)

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

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

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

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

bound = 1
xpoint = 0
for Li in L:
    xpoint +=  Li
    if xpoint > X:
        break
    else:
        bound += 1

print(bound)

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