def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 1
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
    
if __name__ == "__main__":
    main() def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 1
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
     main 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 dist = 0 dist 0 count = 1 count 1 for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
     i range(n) range n dist += l[i] dist l[i] l i if dist > x:
            break
         dist > x dist x break count += 1 count 1 print(count) print count if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 1
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
     def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 1
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
     main
def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 1
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
    
if __name__ == "__main__":
    main()