import Data.List
main = interact $ unlines . map (show . railway_lines . map (read::String->Float) . splitOn ',') . lines

splitOn c xs
 | null xs = []
 | head xs == c = splitOn c (tail xs)
 | otherwise = (takeWhile (/= c)) xs : splitOn c (dropWhile (/= c) xs)

railway_lines xs = head $ findIndices (>= th) $ scanl (+) 0 sections
 where 
  th = (sum sections * v1) / (v1+v2)
  (sections,[v1,v2]) = splitAt 10 xs