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 pi = acos ~-.1.0 in
  let x = ref 0.0 in
  let y = ref 0.0 in
  let j = ref 0 in
  let ans = ref 0.0 in
  let get_angle i = let (x, y) = ps.(i mod n) in if i < n then atan2 y x else atan2 y x +. 2.0 *. pi in
  for i = 0 to n - 1 do
    while !j < i + n && get_angle !j <= get_angle i +. pi do
      x := !x +. fst ps.(!j mod n);
      y := !y +. snd ps.(!j mod n);
      incr j;
    done;
    ans := max !ans (!x *. !x +. !y *. !y);
    x := !x -. fst ps.(i);
    y := !y -. snd ps.(i);
    ans := max !ans (!x *. !x +. !y *. !y);
  done;
  printf "%.15f\n" (sqrt !ans);
