let search d lst =
  let rec iter i = function
    | [] -> i - 1
    | hd :: tl when hd <= d -> i - 1
    | hd :: tl -> iter (i+1) tl
  in iter 1 lst

let section lst v1 v2 = 
  let sod = List.fold_left (+.) 0.0 lst in
  let dlst = List.fold_right (fun x s -> (x +. List.hd s) :: s) lst [0.0] in
  let d2 = sod /. (v1 +. v2) *. v2 in
  search d2 dlst
  
let _ = 
  try
    while true do
      let ls, v1, v2 = Scanf.scanf "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f\n" (fun l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 v1 v2 -> [l1;l2;l3;l4;l5;l6;l7;l8;l9;l10], v1, v2) in
      Printf.printf "%d\n" (section ls v1 v2)
    done
  with
    End_of_file -> ()
        