arr = Array.new
while line = gets
  arr << line
end
arr.each do |i|
  a = i.split(",")
  a.map!{|j| j.to_i}
  l = a[0..9]
  v = a[10..11]
  sum = 0
  0.upto(l.length - 1) do |j|
    sum += l[j]
  end
  c = sum * (v[0] / (v[0] + v[1]).to_f)
  sum = 0
  j = 0
  until c <= sum
    sum += l[j]
    j += 1
  end
  p j 
end