N,X = map(int,input().split())
L = list(map(int,input().split()))
C = 1
M = 0

for i in range(N):
    M = M + L[i]
    if M > X:
        print(C)
        exit(0)
    
    C = C + 1

print(C) 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 C = 1 C 1 M = 0 M 0 for i in range(N):
    M = M + L[i]
    if M > X:
        print(C)
        exit(0)
    
    C = C + 1 i range(N) range N M = M + L[i] M M + L[i] M L[i] L i if M > X:
        print(C)
        exit(0)
    
     M > X M X print(C) print C exit(0) exit 0 C = C + 1 C C + 1 C 1 print(C) print C C = C + 1 C + 1 C C = 1 1 C X = map(int,input().split()) map(int,input().split()) X M = 0 0 M M = M + L[i] M + L[i] M N,X = map(int,input().split()) map(int,input().split()) N L = list(map(int,input().split())) list(map(int,input().split())) L
N,X = map(int,input().split())
L = list(map(int,input().split()))
C = 1
M = 0

for i in range(N):
    M = M + L[i]
    if M > X:
        print(C)
        exit(0)
    
    C = C + 1

print(C)