N=gets.to_i
E=N.times.map{gets.split.map(&:to_i)}.sort{|(x1,y1),(x2,y2)|Math.atan2(y1,x1)<=>Math.atan2(y2,x2)}
ans=0
N.times do |i|
  x,y=0,0
  N.times do |j|
    e=E[(i+j)%N]
    x+=e[0]
    y+=e[1]
    ans=[ans,x**2+y**2].max
  end
end
puts "%.12f"%Math.sqrt(ans)