import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, X, *L = map(int, read().split())
    
    ans = 1
    d = 0
    for l in L:
        d += l
        if d <= X:
            ans += 1
        else:
            break
    
    print(ans)
    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    N, X, *L = map(int, read().split())
    
    ans = 1
    d = 0
    for l in L:
        d += l
        if d <= X:
            ans += 1
        else:
            break
    
    print(ans)
    return main N, X, *L = map(int, read().split()) N map(int, read().split()) map int read().split() ().split () read split X *L L ans = 1 ans 1 d = 0 d 0 for l in L:
        d += l
        if d <= X:
            ans += 1
        else:
            break
    
     l L d += l d l if d <= X:
            ans += 1
        else:
            break
    
     d <= X d X ans += 1 ans 1 break print(ans) print ans return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readlines = sys.stdin.readlines sys.stdin.readlines readlines readline = sys.stdin.readline sys.stdin.readline readline read = sys.stdin.read sys.stdin.read read MOD = 1000000007 1000000007 MOD INF = 1 << 60 1 << 60 INF def main():
    N, X, *L = map(int, read().split())
    
    ans = 1
    d = 0
    for l in L:
        d += l
        if d <= X:
            ans += 1
        else:
            break
    
    print(ans)
    return def main():
    N, X, *L = map(int, read().split())
    
    ans = 1
    d = 0
    for l in L:
        d += l
        if d <= X:
            ans += 1
        else:
            break
    
    print(ans)
    return main
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, X, *L = map(int, read().split())
    
    ans = 1
    d = 0
    for l in L:
        d += l
        if d <= X:
            ans += 1
        else:
            break
    
    print(ans)
    return


if __name__ == '__main__':
    main()
