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

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)








n,x=n1()
L=n1()
ans=1
c=0
for i in L:
    c+=i
    if c>x:
        break
    ans+=1
print(ans)

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

cnt = 0
l = list()
for i in A:
    cnt += i
    l.append(cnt)

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

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

n,x = intMap()
l = intList()

ans = 1
d = 0

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

print(ans)

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

dis=0

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

Solution (Python):

import numpy as np


def main():
    N, X = map(int, input().split())
    L_list = list(map(int, input().split()))
    L_sum = np.cumsum(L_list)
    print(np.where(L_sum <= X)[0][-1] + 2)


if __name__ == '__main__':
    main()

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

for l in list(map(int,input().split())):
    x+=l
    if x>X: break
    cnt+=1

print(cnt)

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

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

Solution (Python):
import bisect
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])
print(bisect.bisect_right(D,X))

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

Solution (Python):
import sys
from sys import stdin

n, x = map(int, stdin.readline().split())
count = 1
num = 0
num_list = [0]

l = list(map(int, stdin.readline().split()))

for i in l:
  num += i
  num_list.append(num)
  if(num > x):
    print(count)
    sys.exit()
  else:
    count += 1 

print(count)

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

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

Solution (Python):


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

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

ans = [i <= x for i in d]
print(sum(ans))

Solution (Python):
n, x = [int(x) for x in input().split()]
k = 0
ans = 1
for li in input().split():
    k += int(li)
    ans += k <= x

print(ans)

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

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

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

a=0
for j in range(N+1):
    if D[j] <= X:
        a=a+1
    else:
        pass

print(a)

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

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

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
temp=[0]*(n+1)
for i in range(0,n):
  temp[i+1]=temp[i]+l[i]
import bisect
print(bisect.bisect_right(temp,x))

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

Solution (Python):

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


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

print(cnt)

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

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

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

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

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

Solution (Python):
import os

def main():
    n,x = map(int, input().split())
    list_a = list(map(int, input().split()))
    ans = 0
    count = 1

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

    print(count)

if __name__ == "__main__":
    main()

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])
  if d[i+1]>x:
    print(i+1)
    break
else:
  print(n+1)

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

Solution (Python):
import bisect
n,x=map(int,input().split())
L=list(map(int,input().split()))
lst=[0]*(n+1)
for i in range(1, n+1):
  lst[i]=lst[i-1]+L[i-1]
print(bisect.bisect_right(lst,x))

Solution (Python):
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import numpy as np
import sys
sys.setrecursionlimit(10**6)




input_list = lambda : list(map(int,input().split()))


n,x=input_list()
a=input_list()
ans=1
n=0
for each in a:
    n=n+each
    if n<=x:
        ans+=1
print(ans)

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

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

for L in Ls:
    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
p = 1
for i in range(n):
    d = d + l[i]
    if d <= x:
        p += 1
    else:
        break
print(p)

Solution (Python):
import itertools
import math
import fractions
import functools
import copy

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

print(count)

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

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:
        break
    cnt += 1

print(cnt)

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

ans = 1
sm = 0
for i in l:
  sm += i
  if sm > x:
    break
  ans += 1
    
print(ans)

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

Solution (Python):
import bisect

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

ans = bisect.bisect_right(DP, X)
print(ans-1)

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

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

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

l=[int(x) for x in input().split()]
d=0
cnt=1
for i in l:
    d+=i
    cnt+=1
    if d > x:
        print(cnt-1)
        break
    elif d==x:
        print(cnt)
        break
if d<x:
    print(cnt)

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

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

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])
cnt=0
for dd in d:
  if dd>x:
    break
  cnt+=1
print(cnt)

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

for i in range(N+1):
    if sum(Llist[:i]) > X:
        print(i)
        exit()
else:
    print(i+1)

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

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

Solution (Python):






import sys
input = sys.stdin.readline

import math
import bisect
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)


def bit_count(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count





N,X = inputIL()
L = inputIL()

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

print(count)

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

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

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

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

cnt = 1
suml = 0

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

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

cnt = 1
tmp = 0

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

Solution (Python):
import sys
import math
import bisect

def main():
    n, m = map(int, input().split())
    A = list(map(int, input().split()))
    B = [0]
    for a in A:
        B.append(B[-1] + a)
    ans = 0
    for b in B:
        if b <= m:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

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

N, X = [int(n) for n in input().split()]
L = list(accumulate([0] + [int(n) for n in input().split()]))
print(bisect(L, X))

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

N, X = [int(n) for n in input().split()]
L = accumulate([0] + [int(n) for n in input().split()])
l = [n for n in L]
print(bisect(l, X))

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

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

dis = 0
ans = 1
for i in range(n):
    dis += L[i]
    if dis > x:
        dis -= L[i]
        break
    ans += 1

print(ans)

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

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

l2 = [0]*(n+1)

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

Solution (Python):
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

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

if __name__=='__main__':
    main()

Solution (Python):
import sys
N,X = map(int,input().split())
l = list(map(int,input().split()))
for i in range(N-1):
  l[i+1] += l[i]
  
for i in range(N):
  if l[i] > X:
    print(i+1)
    sys.exit()
    
print(N+1)

Solution (Python):

"""
Created on Tue May 12 00:21:28 2020

@author: shinba
"""

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

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

i = 0
ans = 1

for j in range(n):
    i += L[j]
    if i <= x:
        ans += 1
        continue
    else:
        break

print(ans)

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

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

print(count)

Solution (Python):
import sys
input = sys.stdin.readline
N, X = map(int, input().split())
A = list(map(int, input().split()))
B = [0]
cnt = 0

for i in range(N):
  B.append(B[i]+A[i])

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

print(cnt)

Solution (Python):
def bounding(n, x, lli):

    ans = 1
    count = 0

    for i in lli:
        count += i
        if count <= x:
            ans += 1

    return ans
def main():
    n, x = map(int, input().split())
    lli = list(map(int, input().split()))
    print(bounding(n, x, lli))

if __name__ == '__main__':
    main()

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

    for i in range(1, N+1):
        a = D[i - 1] + L[i - 1]
        if a <= X:
            D.append(a)
        else:
            break

    print(len(D))


if __name__ == "__main__":
    main()

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

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

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

t = 0
cnt = 1

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

Solution (Python):
import bisect

N, X = map(int, input().split())
l = list(map(int, input().split()))
d = [-1]*(N+1) 
d[0] = 0 

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




print(bisect.bisect_right(d, X))

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

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

print(cnt)

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

cnt = 0
for i, li in enumerate(l):
    cnt += li
    if cnt > x:
        print(i + 1)
        break
else:
    print(n + 1)

Solution (Python):
import bisect

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

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

print(bisect.bisect_right(L, X))

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

Solution (Python):
def solve():
    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)


solve()

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd

import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n, x = Is()
L = LI()
A = [0]
for i in range(1, n+1):
    A.append(A[i-1]+L[i-1])
index = bisect_right(A, x)
print(index)

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

tmp = 0
ans = 1
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()))

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

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

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

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

dist = 0

for i,d in enumerate(li,2):
  dist += d
  if dist > x:
    i -= 1
    break

print(i)

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

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

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):


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

print(cnt)

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

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

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

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

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

Solution (Python):
n,x=map(int,input().split())
l=list(map(int,input().split()))
length=0
i=0
while length<=x and i<=n-1:
    length+=l[i]
    i+=1
if length<=x:
    print(n+1)
else:
    print(i)

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

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

Solution (Python):

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

Solution (Python):
from bisect import bisect_left


n, x = map(int, input().split())
l = list(map(int, input().split()))
for i in range(n - 1):
  l[i + 1] += l[i]
print(bisect_left(l, x + 1) + 1)

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

position=0
cnt=1

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

print(cnt)

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

D = [0]*(N+1)
for i in range(1,N+1,1):
    D[i] = D[i-1] + L_li[i-1]
print(len([i for i in D if i <= X]))

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    pos = 0
    for i in range(1,N+1):
        pos = pos + L[i-1]
        if pos > X:
            print(i)
            break
    else:
        print(N+1)

if __name__ == '__main__':
    main()

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
sys.setrecursionlimit(10**6)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi


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

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

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

zahyou=[0]
for i in range(n):
    zahyou.append(zahyou[i]+l[i])
for i in range(len(zahyou)):
    if zahyou[i]>x:
        del zahyou[i:n+1]
        break
print(len(zahyou))

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

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

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

bound_List=[0]
for i in range(N):
    bound_List.append(L[i]+bound_List[i])

count=0
for i in bound_List:
    if i<=X:
        count+=1
        
print(count)

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

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

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

Solution (Python):
import bisect as bi
I=lambda:list(map(int,input().split()))
n,x=I()
l=I()
ans=0
t=0
for i in range(1,n):
  l[i]+=l[i-1]
an=bi.bisect(l,x)
print(an+1)

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

d = 0
count = 0
i = 1
while d <= x and i <= n:
    d = d + l[i - 1]
    count += 1
    i += 1
if d <= x:
    count += 1

print(count)

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

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

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

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

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

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

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

for i in L:
  if p + i <= X:
    count += 1
    p += i
  else:
    break
    
print(count)

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

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

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

D = [0] * 2
for i in range(2, N+2):
    D.append( D[i-1] + L[i-2] )
    if D[i] > X:
        ans = i-1
        break
if D[-1] <= X:
    ans = N+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=d+L[i]
    if d<=x:
        ans+=1
print(ans)

Solution (Python):

N,X=map(int,input().split())
L= [int(j) for j in input().split()]
cnt=0
d = 0

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

Solution (Python):

N,X=map(int,input().split())
L= [int(j) for j in input().split()]
cnt=0
import numpy as np
jump = list(np.cumsum(L))
for j in jump:
    if j <= X:
        cnt+=1
    else:
        break
print(cnt+1)

Solution (Python):

N,X=map(int,input().split())
L= [int(j) for j in input().split()]
cnt=0
import numpy as np
jump = list(np.cumsum(L))
for j in jump:
    if j <= X:
        cnt+=1
print(cnt+1)

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

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

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


print(res)

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

for i in range(n):
    if total <= x:
        ans += 1
    else:
        break
    total += l_list[i]
if total <=x:
    ans += 1
print(ans)

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

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

Solution (Python):
import sys
import math
from collections import Counter
import itertools



def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



N,X=MI()
L=LI()
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
c = 1
for i in range(1, n + 1):
    d += l[i - 1]
    if d <= x:
        c += 1
    else:
        break
print(c)

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

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