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