function main(input){
  input = input.split("\n");
  l = input[1].split(" ");
  input = input[0].split(" ");
  var n = parseInt(input[0], 10);
  var x = parseInt(input[1], 10);
  var bound_position = 0;
  var bound_count = 1;
  for(var i = 0; i < n; i++){
    bound_position += parseInt(l[i], 10);
    if(bound_position > x){
      break;
    }else{
      bound_count++;
    }
  }
  console.log(bound_count);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
