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