object Main {
    def main(args: Array[String]) = {
        val in = io.Source.stdin.getLines.map(_.split(",").map(_.toInt).splitAt(10))
        for ((l, v) <- in) println(l.scanLeft(0)(_ + _).indexWhere(v(0).toDouble * l.sum / v.sum <= _))
    }
}