def main
  n, range = gets.chomp.split(' ').map(&:to_i)
  l = gets.chomp.split(' ').map(&:to_i)
  d = 0
  
  (n+1).times do |i|
    next if i == 0
    
    d_i = d + l[i-1]
    return i if d_i > range
    d = d_i
  end
end


puts main