#include<bits/stdc++.h>
#define For(a,b,c) for(int a=b;a<=c;++a)
using namespace std;
const int N=107;
struct V {
	int x,y;
	bool operator < (const V &_) const {
		return atan2(y,x)<atan2(_.y,_.x);
	}
	V operator + (const V &_) const {
		return (V){x+_.x,y+_.y};
	}
	long long len2() {
		return 1LL*x*x+1LL*y*y;
	}
}A[N];
int n;
int main() {
	scanf("%d",&n);
	For(i,1,n) scanf("%d%d",&A[i].x,&A[i].y);
	sort(A+1,A+1+n);
	long long ans=0;
	For(i,1,n) {
		V r=(V){0,0};
		For(j,0,n-1) {
			r=r+A[(i+j-1)%n+1];
			ans=max(ans,r.len2());
		}
	}
	printf("%.14f",sqrt(ans));
	return 0;
}