$stdin.each {|x|
  a = x.split(",").map(&:to_i)
  v2, v1 = a.pop, a.pop
  total = a.inject(:+)
  at = 1.0 * total * v1 / (v1 + v2)
  a.each_with_index{|l,i|
    at -= a[i]
    if at <= 0
      p i+1
      break
    end
  }
}