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

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

print(count)

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



x = 0
cnt = 0
if x <= X:
    cnt += 1

for l in L:
    x += l
    if x <= X:
        cnt += 1

print(cnt)

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

ans = 1
d = 0
for l in L:
    d = d+l
    if d > X:
        break
    ans += 1

print(ans)

Solution (Python):
n, x = map(int, input().split())
curr = 0
res = 1
for e in map(int, input().split()):
    curr += e
    if curr > x:
        break
    res += 1

print(res)

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

print(cnt+1)

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

Solution (Python):
def solve(N, X, L):
    x = 0
    c = 1
    for l in L:
        x += l
        if x > X:
            break
        c += 1
    return c

def main():
    N, X = [int(x) for x in input().split()]
    L = [int(x) for x in input().split()]
    print(solve(N, X, L))
    pass
main()

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

print(ans)

Solution (Python):
import sys
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  



s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, X = i2nn()
    L = i2nn()
    c = 1
    p = 0
    for l in L:
        p += l
        if p <= X:
            c += 1
        else:
            break
    print(c)

main()

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

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

pre = 0
ans = 1

for l in L:
    temp = pre + l
    if x >=  temp:
        ans += 1
    pre = temp
print(ans)

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

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

print(cnt)

Solution (Python):



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

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

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

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

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

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

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

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

print(count)

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right





def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")



N, X = l_inpl()
L = l_inpl()

cnt = 1
now = 0

for Li in L:
    now += Li
    
    if now > X:
        break
    cnt += 1

print(cnt)

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

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

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

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

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

print(count)

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

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

count=1
now=0

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

print(count)

Solution (Python):
import collections
import itertools

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

d = 0
counter = 1

for l in L:
    d += l
    if (d <= X):
        counter += 1

print(counter)

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

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

D = [0]

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

print(len(D))

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

sumv = 0
cnt = 1
for l in L:
  sumv += l
  if sumv > X: break
  cnt += 1

print(cnt)

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

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

Solution (Python):

import sys


def solve(N: int, X: int, L: "List[int]"):
    D = 0
    count = 1
    for i in range(N):
        D = D + L[i]
        if D <= X:
            count += 1
    print(count)
    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 = (int(_) for _ in input().split())
bounce = [int(_) for _ in input().split()]
curr = 0
ans = 0
if curr <= x:
    ans += 1
for i in bounce:
    curr += i
    if curr <= x:
        ans += 1
print(ans)

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, X, L):
    ans = 0
    D = 0
    for l in L:
        if D <= X:
            ans += 1
        D += l
    if D <= X:
        ans += 1

    return ans


def main():
    N, X = read_int_n()
    L = read_int_n()
    print(slv(N, X, L))


if __name__ == '__main__':
    main()

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

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

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

l=[0]+[int(i) for i in input().split()]
ans=0

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

print(ans)

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

total=0
count=0
for i in range(n):
  total+=a[i]
  if(total<=x):
    count+=1
print(count+1)

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

c = 1
d = 0

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

print(c)

Solution (Python):
import sys
from operator import itemgetter

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n, x = na()
li = na()
ct = 1
h = 0
for num in li:
    h += num
    if h <= x:
        ct += 1
print(ct)

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

Solution (Python):
import sys
import math 
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()
N,X = na()

L = na()
c=1
tmp=0
for i in L:
    tmp += i
    if(tmp>X):
        break
    c+=1
print(c)

Solution (Python):
from itertools import accumulate

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

q = [0] + list(accumulate(L))
print(sum(1 for v in q if v <= X))

Solution (Python):
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
print(ans)

Solution (Python):
def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def main():
    n,x=map(int, input().split())
    ans = 1
    s = 0
    for i in map(int, input().split()):
        s += i
        if s <= x:
            ans += 1
        else:
            break
    print(ans)


main()

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

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

ans = 0
a = 0
for i in L:
    if a <= x:
        ans += 1
    a += i

if a <= x:
    ans += 1

print(ans)

Solution (Python):

import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n,x = f()
    l = f()

    a = []
    a.append(0)

    for i in l:
        a.append(a[-1] + i)

    ans = 0 
    for i in a:
        if i <= x:
            ans += 1
    
    print(ans)

solve()

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

bound=1
axis=0
for L in llist:
  axis += L
  if axis <= X:
    bound += 1
  else:
    break
    
print(bound)

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

pos = 0
ans = 0

if pos <= X:
    ans += 1

for l in Ls:
    pos += l
    if pos <= X:
        ans += 1

print(ans)

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

    ans += 1

print(ans)

Solution (Python):
N, X = [int(i) for i in input().split()]
L = [int(i) for i 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 e in d if e <= X]))

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

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

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

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):
n, x = map(int, input().split())
l_list = list(map(int, input().split()))
d = 0
count = 1
for l in l_list:
    d += l
    if d > x:
        break
    count += 1
print(count)

Solution (Python):

N,X = map(int,input().split())
L =[int(i)for i in input().split()]
ans = 1
D =0
for i in L:
    D += i
    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
dist = 0

for l in L:
	dist += l
	if dist > X:
		break
	cnt += 1
print(cnt)

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

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

print(ans)

Solution (Python):
n,x = map(int,input().split())
e = list(map(int,input().split()))
cn = 0
le = 0
for v in e:
    le += v
    if le > x:
        break
    else:
        cn += 1
print(cn + 1)

Solution (Python):
import sys
input=sys.stdin.readline
from collections import deque
from heapq import heappush,heappop
import re

def int_raw():
    return int(input())
 
def ss_raw():
    return input().split()
 
def ints_raw():
    return tuple(map(int, ss_raw()))


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


DIV = 10**9+7

def ncr(n, r, mod=DIV):
	r = min(r, n-r)
	ret = 1
	for i in range(1, r+1):
		ret = ret * (n-i+1) % mod
		ret = ret * mod_inv(i, mod) % mod
	return ret


def main():
    ans =0
    N,X = ints_raw()
    Ls = ints_raw()
    D = 0
    for l in [0]+list(Ls):
        D+=l
        if D<=X:
            ans+=1
    return ans

print(main())

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys

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


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

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

print(cnt)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n, x = rli()
    ll = rli()
    ans = 1
    d = 0
    for l in ll:
        d += l
        if d <= x:
            ans += 1
    print(ans)



if __name__ == '__main__':
    main()

Solution (Python):
import sys

inf = 10 ** 18

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

D = 0
cnt = 1
for i, Li in enumerate(L):
    D += Li
    if D <= X: cnt += 1

print(cnt)

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

Solution (Python):
def main():
    n, x = map(int, input().split())
    arr = map(int, input().split())
    ans = 1
    curr = 0
    for l in arr:
        curr += l
        if curr <= x:
            ans += 1
        else:
            break
    print(ans)
    return 0

main()

Solution (Python):
N, X = map(int,input().split())
L = list(map(int,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
print(cnt)

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

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

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

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

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

cnt = 1
now = 0
for y in l:
    now += y
    if now > x:
        break
    cnt += 1

print(cnt)

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

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

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

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

ans = 1
d = 0

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

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

print(n+1)

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

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

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

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

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

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

Solution (Python):
from itertools import accumulate
from bisect import bisect_right

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

l = [0] + list(accumulate(L))
print(bisect_right(l, X))

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

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

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

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

x = 0
ans = 1
for l in L:
    x += l
    if x > X: break
    ans += 1

print(ans)

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

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

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


def main():
    N, X = LI()
    L = LI()
    now = 0
    count = 1
    for l in L:
        now += l
        if now > X:
            break
        count += 1
    print(count)


main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, X = MAP()
L = LIST()

L = list(accumulate(L))

L.insert(0, 0)


ans = 0
for i in L:
	if i <= X:
		ans += 1
print(ans)

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

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

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

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

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

print (count)

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

Solution (Python):
N, X = map(int, input().split())
L = [int(_) for _ in input().split()]
ans = 1
tmp = 0

for i in L:
    tmp += i
    if tmp <= X:
        ans += 1
    else:
        break

print(ans)

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

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

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

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

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

cnt = 1
cur = 0
for i, LL in enumerate(L):
    cur += LL
    if cur <= X:
        cnt += 1
print(cnt)

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



n, x = map(int, input().split())
r = 0
s = 0
a = list(map(int, input().split()))
for l in a:
    s += l
    if s <= x:
        r += 1

print(r+1)

Solution (Python):
def getlist():
	return list(map(int, input().split()))

N, X = getlist()
L = getlist()

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

print(ans)

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

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

ans = 1
d = 0

for i in range(len(L)) :
    d += L[i]
    if d <= X :
        ans += 1
print(ans)

Solution (Python):


def main():
    n, x = map(int, raw_input().split())
    ll = map(int, raw_input().split())
    d = 0
    ans = 1
    for l in ll:
        d += l
        if d <= x:
            ans += 1
        else:
            break
    print ans


if __name__ == '__main__':
    main()

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

n,x = getList()
nums = getList()
ans = 1
tmp = 0
for num in nums:
    tmp += num
    if tmp<=x:
        ans += 1

print(ans)

Solution (Python):


def main():
    N, X = map( int, input().split())
    L = list( map( int, input().split()))
    ans = 1
    now = 0
    for i in range(N):
        now += L[i]
        if now > X:
            break
        ans += 1
    print(ans)
        
if __name__ == '__main__':
    main()

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

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

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

print(cnt)

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

print(count)

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

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

dist = 0
count = 1
for l in L:
    dist += l
    if dist <= X:
        count += 1
    else:
        break

print(count)

Solution (Python):











import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N, X = MI()
    L = LI()
    now = 0
    ans = 1
    for l in L:
        now += l
        if now <= X:
            ans += 1
    print(ans)
if __name__ == '__main__':
    main()

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

Solution (Python):
N, X = map(int, raw_input().split())
L = map(int, raw_input().split())
D = [0]
for l in L:
 D.append(D[-1] + l)
print sum(d <= X for d in D)

Solution (Python):
import math

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

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

print(ans)

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

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

print(ans)

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

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

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

print(count)

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

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

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

def main():
  n,x=LI()
  l=LI()

  a=0
  c=1
  for b in l:
    a+=b
    if a<=x:
      c+=1
    else:
      break

  return c

print(main())

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

pos = 0
cnt = 1
for _l in l:
    pos += _l
    if pos > X:
        break
    cnt += 1

print(cnt)

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

cur = 0
cnt = 0
for i in range(n):
  if cur <= x:
    cnt += 1
  cur += ls[i]
if cur <= x:
  cnt += 1

print(cnt)

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

ans = 0
z = 0
pr = 0
for i in range(N+1):
    if i >= 1:
        z = l_list[i-1] + pr
    if z <= X:
        ans += 1
    pr = z
print(ans)

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

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

Solution (Python):




 
from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul,itemgetter
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)


a,b=map(int,input().split())
*x,=list(accumulate(map(int,input().split())))
x=[-1]+x

print(bisect_right(x,b))

Solution (Python):




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

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


print(ans)

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

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