import bisect
import sys
input = sys.stdin.readline

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

N,X = list(map(int,input().split()))
L = list(map(int,input().split()))
bn = [0]
for i in range(N):
    bn.append(bn[-1]+L[i])
print(bisect.bisect_right(bn,X))
