from itertools import accumulate
from bisect import *
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = list(accumulate([0]+L))
print(bisect_right(S,X)) from itertools import accumulate from bisect import * 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 S = list(accumulate([0]+L)) S list(accumulate([0]+L)) list accumulate([0]+L) accumulate [0]+L [0] 0 L print(bisect_right(S,X)) print bisect_right(S,X) bisect_right S X L = list(map(int, input().split())) list(map(int, input().split())) L N, X = map(int, input().split()) map(int, input().split()) N X = map(int, input().split()) map(int, input().split()) X S = list(accumulate([0]+L)) list(accumulate([0]+L)) S
from itertools import accumulate
from bisect import *
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = list(accumulate([0]+L))
print(bisect_right(S,X))