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