#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <functional>
#include <bitset>
#include <cassert>
#include <random>
using namespace std;
using ll = long long;


int main() {
	int n; cin >> n;
	vector<ll> x(n), y(n);
	std::mt19937 mt(1333);
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
	}
	auto dist = [](ll x, ll y) { return sqrt(x*x + y*y); };
	double ans = 0;
	for (int iter = 0; iter < 1000000; iter++) {
		ll rx = (mt() & 1 ? 1 : -1)*mt(), ry = (mt() & 1 ? 1 : -1)*mt();
		ll cx = 0, cy = 0;
		for (int i = 0; i < n; i++) {
			if (rx*x[i] + ry*y[i] > 0) {
				cx += x[i];
				cy += y[i];
			}
		}
		ans = max(ans, dist(cx, cy));
	}
	printf("%.20f\n", ans);
	return 0;
}