N,X = map(int,input().split())
L = list(map(int,input().split()))
List = [0]*(N+1)
for i in range(1,N+1):
    List[i] = List[i-1] + L[i-1]
import bisect  
# A = [i for i in List if i <=X]
# print(len(A))
print(bisect.bisect_left(List,X+1)) 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 List = [0]*(N+1) List [0]*(N+1) [0] 0 N+1 N 1 for i in range(1,N+1):
    List[i] = List[i-1] + L[i-1] i range(1,N+1) range 1 N+1 N 1 List[i] = List[i-1] + L[i-1] List[i] List i List[i-1] + L[i-1] List[i-1] List i-1 i 1 L[i-1] L i-1 i 1 import bisect bisect print(bisect.bisect_left(List,X+1)) print bisect.bisect_left(List,X+1) bisect.bisect_left bisect bisect_left List X+1 X 1 N,X = map(int,input().split()) map(int,input().split()) N L = list(map(int,input().split())) list(map(int,input().split())) L List = [0]*(N+1) [0]*(N+1) List X = map(int,input().split()) map(int,input().split()) X
N,X = map(int,input().split())
L = list(map(int,input().split()))
List = [0]*(N+1)
for i in range(1,N+1):
    List[i] = List[i-1] + L[i-1]
import bisect  
# A = [i for i in List if i <=X]
# print(len(A))
print(bisect.bisect_left(List,X+1))
