require 'mathn'

$<.each_line do |line|
	*l, v1, v2 = line.split(',').map(&:to_i)

	meet = l.inject(&:+) / (v1 + v2) * v1
	sum = 0
	l.each.with_index(1) do |len, i|
		if meet <= sum += len
			p i
			break
		end
	end
end