open Scanf;;
open Printf;;

let rint () = scanf " %d" (fun x -> x);;
let rpoint () = scanf " %f %f" (fun x y -> x, y);;

let () =
  let n = rint () in
  let ps = Array.init n (fun _ -> rpoint ()) in
  Array.sort (fun (a, b) (c, d) -> compare (atan2 b a) (atan2 d c)) ps;
  let ans = ref 0.0 in
  for i = 0 to n - 1 do
    let x = ref 0.0 in
    let y = ref 0.0 in
    for j = 0 to n - 1 do
      x := !x +. fst ps.((i + j) mod n);
      y := !y +. snd ps.((i + j) mod n);
      ans := max !ans (!x *. !x +. !y *. !y);
    done;
  done;
  printf "%.15f\n" (sqrt !ans);
