let () =
  let third_root q =
    let rec f x =
      let c = x*.x*.x and
          t = 0.00001*.q in
      if c-.q > (t*.(-1.)) && c-.q < t then x
      else
        f (x-.((c-.q)/.(3.*.x*.x)))
    in
    f (q/.2.)
  in
  let rec read () =
    let n = read_float () in
    if n = (-1.) then ()
    else
      begin
        Printf.printf "%f\n" (third_root n);
        read ()
      end
  in read ()
;;