def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = list(accumulate([0] + L))
    ans = 0
    for s in S:
        if X < s:
            break
        ans += 1
    print(ans)


if __name__ == '__main__':
    main() def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = list(accumulate([0] + L))
    ans = 0
    for s in S:
        if X < s:
            break
        ans += 1
    print(ans) main int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i N, X = (int(i) for i in input().split()) N (int(i) for i in input().split()) X int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i L = [int(i) for i in input().split()] L [int(i) for i in input().split()] from itertools import accumulate S = list(accumulate([0] + L)) S list(accumulate([0] + L)) list accumulate([0] + L) accumulate [0] + L [0] 0 L ans = 0 ans 0 for s in S:
        if X < s:
            break
        ans += 1
     s S if X < s:
            break
         X < s X s break ans += 1 ans 1 print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = list(accumulate([0] + L))
    ans = 0
    for s in S:
        if X < s:
            break
        ans += 1
    print(ans) def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = list(accumulate([0] + L))
    ans = 0
    for s in S:
        if X < s:
            break
        ans += 1
    print(ans) main
def main():
    N, X = (int(i) for i in input().split())
    L = [int(i) for i in input().split()]
    from itertools import accumulate
    S = list(accumulate([0] + L))
    ans = 0
    for s in S:
        if X < s:
            break
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()
