let input = readLine()!.characters.split(" ").map{Int(String($0))!}
let (N, X) = (input[0], input[1])
let L = readLine()!.characters.split(" ").map{Int(String($0))!}
var D = 0
print(L.reduce(1){D+=$1;return $0+(D>X ?0:1)})