let () =
  let rec read () =
    let x = read_float () and
        h = read_float () in
    if x = 0. && h = 0. then ()
    else
      let h2 = sqrt(h*.h+.x*.x/.4.) in
      Printf.printf "%f\n" (x*.x+.2.*.x*.h2);
      read ()
  in read ()
;;