n, x = list(map(int, input().split()))
arr = list(map(int, input().split()))
if x == 0:
    print(0)
    exit()
sum = 0
count = 1
i = 0
while i < n:
    sum += arr[i]
    i += 1
    if sum <= x:
        count += 1
    else:
        print(count)
        exit()
print(count) 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 arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split if x == 0:
    print(0)
    exit() x == 0 x 0 print(0) print 0 exit() exit sum = 0 sum 0 count = 1 count 1 i = 0 i 0 while i < n:
    sum += arr[i]
    i += 1
    if sum <= x:
        count += 1
    else:
        print(count)
        exit() i < n i n sum += arr[i] sum arr[i] arr i i += 1 i 1 if sum <= x:
        count += 1
    else:
        print(count)
        exit() sum <= x sum x count += 1 count 1 print(count) print count exit() exit print(count) print count n, x = list(map(int, input().split())) list(map(int, input().split())) n x = list(map(int, input().split())) list(map(int, input().split())) x sum = 0 0 sum count = 1 1 count count += 1 1 count sum += arr[i] arr[i] sum arr = list(map(int, input().split())) list(map(int, input().split())) arr i = 0 0 i i += 1 1 i
n, x = list(map(int, input().split()))
arr = list(map(int, input().split()))
if x == 0:
    print(0)
    exit()
sum = 0
count = 1
i = 0
while i < n:
    sum += arr[i]
    i += 1
    if sum <= x:
        count += 1
    else:
        print(count)
        exit()
print(count)
