N=gets.to_i
E=N.times.map{gets.split.map(&:to_i)}.sort{|(x,y)|Math.atan2(y,x)}
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]
    x+=e[0]
    y+=e[1]
    ans=[ans,x**2+y**2].max
  end
end
puts "%.12f"%Math.sqrt(ans)