#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iomanip>

using namespace std;

typedef pair<int, int> P_;
typedef pair<double, P_> P;

const double PI = 3.1415926535897932384526;

vector<P> p;



int main(){
    int N;
    cin >> N;
    for(int i = 0; i < N; i++){
        double x, y;
        cin >> x >> y;
        double t = atan2(y, x);
        p.push_back(P(t, P_(x, y)));
    }

    double ans = 0.0;
    sort(p.begin(), p.end());
    for(int i = 0; i < N; i++){
        double sx = 0.0, sy = 0.0;
        for(int j = 0; j < N; j++){
            int k = (i+j)%N;
            sx += p[k].second.first;
            sy += p[k].second.second;
            ans = max(ans, sqrt(sx*sx+sy*sy));
        }
    }
    cout << fixed << setprecision(10);
    cout << ans << endl;
}
