#include "bits/stdc++.h"

using namespace std;

#define int long long
#define ll long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL<<60)

#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define YES puts("YES\n")
#define Yes puts("Yes\n")
#define NO  puts("NO\n")
#define No  puts("No\n")
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }





signed main() {

	int N;
	cin >> N;

	vector<int> x(N), y(N);
	rep(i, N) cin >> x[i] >> y[i];

	double ans = 0.0;

	for (double rad = 0.0; rad < 2*3.14159265; rad += 3.141592/100000) {
		int xx = 0.0, yy = 0.0;
		rep(i, N) {
			if (cos(rad) * x[i] + sin(rad) * y[i] > 0) {
				xx += x[i];
				yy += y[i];
			}
		}
		ans = max(ans, sqrt(xx * xx + yy * yy));
	}
	cout << fixed << setprecision(15) << ans << endl;
	


	return 0;
}
