class Railway
  def initialize
    results = []
    while input = $stdin.gets do
      @rails = input.chomp.split(',').map(&:to_f)
      @v2 = @rails.pop
      @v1 = @rails.pop
      results << cross_check
    end

    results.each do |point|
      puts point
    end
  end

  def cross_check
    rate = @rails.inject(:+) / (@v1+@v2)
    point = rate * @v1
    d = 0
    @rails.each_with_index do |dist, index|
      d += dist
      return index+1 if point <= d
    end
  end
end

r = Railway.new