import bisect
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
for l in L:
  D.append(l+D[-1])
print(bisect.bisect_right(D, X)) import bisect bisect 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 D = [0] D [0] 0 for l in L:
  D.append(l+D[-1]) l L D.append(l+D[-1]) D.append D append l+D[-1] l D[-1] D -1 print(bisect.bisect_right(D, X)) print bisect.bisect_right(D, X) bisect.bisect_right bisect bisect_right D X X = map(int, input().split()) map(int, input().split()) X N, X = map(int, input().split()) map(int, input().split()) N D = [0] [0] D L = list(map(int, input().split())) list(map(int, input().split())) L
import bisect
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
for l in L:
  D.append(l+D[-1])
print(bisect.bisect_right(D, X))