let arr1=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
let n = arr1[0]
let x = arr1[1]

let arr2=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var i = 0
var j = 0
var o = 0

while(  i <= x ){
  if( o >= n ) {
    o += 1 
    break
  }
  i += arr2[o]
  o += 1
}

print( o )
