#include <bits/stdc++.h>

using namespace std;

#define int long long

typedef long long ll;

long long n;
pair<double, double> xy[500];

bool comp(pair<double, double> f, pair<double, double> s)
{
    return atan2(f.second, f.first) < atan2(s.second, s.first);
}

signed main()
{
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> xy[i].first >> xy[i].second;
    }
    sort(xy, xy + n, comp);
    for (int i = n; i < 2 * n; i++)
    {
        xy[i] = xy[i - n];
    }
    double ans = 0;
    for (int i = 0; i < n; i++)
    {
        double x = 0, y = 0;
        for (int j = 0; j < n; j++)
        {
            x += xy[i + j].first;
            y += xy[i + j].second;
            ans = max(ans, x * x + y * y);
        }
    }
    cout << setprecision(20) << sqrt(ans);
}
