def arg(x,y)
  Math.atan2(y,x)
end

N=gets.to_i
E=N.times.map{gets.split.map(&:to_i)}.sort{|e|arg(*e)}

ans=0
N.times do |i|
  x,y=*E[i]
  ans=[ans,x**2+y**2].max
  (N-1).times do |j|
    e=E[(i+1+j)%N]
    a1=arg(x,y)
    a2=arg(*e)
    d=a2-a1
    d=2*Math::PI+d if d < 0
    d=d-Math::PI if Math::PI < d
    break if Math::PI < d
    x+=e[0]
    y+=e[1]
    ans=[ans,x**2+y**2].max
  end
  ans=[ans,x**2+y**2].max
end
puts "%.12f"%Math.sqrt(ans)
