import Foundation
 
let input_line = readLine()!
 
let split = input_line.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
let N = Int(split[0])!
let X = Int(split[1])!
 
var Li = [Int]()
let input_line2 = readLine()!

for i in 0..<N {
    let splits = input_line2.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
	Li = splits.map {Int($0)!}
}

var counter = 1
var boundPosition = 0

for j in 0..<N {
    boundPosition += Li[j]
    if X < boundPosition {
        break
    }
    counter += 1
}

print(counter)