let inp = readLine()!.split(separator: " ").map { Int($0)! }

let N = inp[0]
let X = inp[1]

let L = readLine()!.split(separator: " ").map { Int($0)! }

var current = 0

var d = 0
var i = 0
while i < L.count {
  if d + L[i] > X {
    break
  }
  d += L[i]
  i += 1
}
print(i + 1)