#include<bits/stdc++.h>
#define Pi 3.1415926
#define MAX_N 110
using namespace std;
int n;
long double ans;
struct node
{
	long double x,y,m;
}a[MAX_N];
bool cmp(node a,node b)
{
	return a.m>b.m;
}
int main()
{
	cin>>n;
	for(register int i=1;i<=n;++i)
		cin>>a[i].x>>a[i].y;
	for(register long double i=0;i<2*Pi;i+=0.0001)
	{
		long double sx=0,sy=0;
		for(register int j=1;j<=n;++j)
			a[j].m=a[j].x*cos(i)+a[j].y*sin(i);
		sort(a+1,a+n+1,cmp);
		for(register int j=1;j<=n;++j)
			if(a[j].m<0)
			{
				break;
			}
			else
				sx+=a[j].x,sy+=a[j].y;
		ans=max(ans,sqrt(sx*sx+sy*sy));
	}
	cout<<fixed<<setprecision(15)<<ans<<endl;
	return 0;
}