let () =
  let rec q () =
    let a = Array.init 10 (fun i -> Scanf.scanf "%d," (fun i -> i*2000)) in
    let (v1, v2) = Scanf.scanf "%d,%d " (fun v1 v2 -> (v1, v2)) in
    let l = Array.fold_left (+) 0 a in
    let t = l / (v1 + v2) in
    let rec doit i acc =
      if t*v1 <= acc+a.(i) then Printf.printf "%d\n" (i+1)
      else doit (i + 1) (acc+a.(i)) in
    doit 0 0;
    q() in
  try q() with _ -> ()