#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <memory>
#include <regex>
using namespace std;

template <class T1>
class Operators
{
public:
    template <class T2>
    const T1 operator+(const T2& right) const{
        T1 ans = static_cast<const T1&>( *this );
        return ans += right;
    }
    template <class T2>
    const T1 operator-(const T2& right) const{
        T1 ans = static_cast<const T1&>( *this );
        return ans -= right;
    }
    template <class T2>
    const T1 operator*(const T2& right) const{
        T1 ans = static_cast<const T1&>( *this );
        return ans *= right;
    }
    template <class T2>
    const T1 operator/(const T2& right) const{
        T1 ans = static_cast<const T1&>( *this );
        return ans /= right;
    }
    template <class T2>
    const T1 operator%(const T2& right) const{
        T1 ans = static_cast<const T1&>( *this );
        return ans %= right;
    }
    bool operator!=(const T1& right) const{
        const T1& left = static_cast<const T1&>( *this );
        return !(left == right);
    }
    bool operator>(const T1& right) const{
        const T1& left = static_cast<const T1&>( *this );
        return right < left;
    }
    bool operator<=(const T1& right) const{
        const T1& left = static_cast<const T1&>( *this );
        return !(right < left);
    }
    bool operator>=(const T1& right) const{
        const T1& left = static_cast<const T1&>( *this );
        return !(left < right);
    }
};

class Point : public Operators<Point>
{
public:
    int y, x;
    Point(){
        y = x = 0;
    }
    Point(int y0, int x0){
        y = y0;
        x = x0;
    }
    Point& operator+=(const Point& p){
        y += p.y;
        x += p.x;
        return *this;
    }
    Point& operator-=(const Point& p){
        y -= p.y;
        x -= p.x;
        return *this;
    }
    Point& operator*=(int a){
        y *= a;
        x *= a;
        return *this;
    }
    Point& operator/=(int a){
        y /= a;
        x /= a;
        return *this;
    }
    bool operator==(const Point& p) const{
        return y == p.y && x == p.x;
    }
    long long length2() const{
        return y * (long long)y + x * (long long)x;
    }
    long long dist2(const Point& p) const{
        return (y - p.y) * (long long)(y - p.y) + (x - p.x) * (long long)(x - p.x);
    }
    long long dot(const Point& p) const{
        return y * (long long)p.y + x * (long long)p.x; // |a|*|b|*cosθ
    }
    long long cross(const Point& p) const{
        return x * (long long)p.y - y * (long long)p.x; // |a|*|b|*sinθ
    }
};

void sortArgument(vector<Point>& p)
{
    class Compare
    {
    public:
        bool operator()(const Point& p1, const Point& p2) const{
            bool a = p1.y > 0 || (p1.y == 0 && p1.x >= 0);
            bool b = p2.y > 0 || (p2.y == 0 && p2.x >= 0);
            if(a != b)
                return a;
            long long c = p2.x * (long long)p1.y;
            long long d = p1.x * (long long)p2.y;
            if(c != d)
                return c < d;
            return p1.length2() < p2.length2();
        }
    };
    sort(p.begin(), p.end(), Compare());
}

int main()
{
    int n;
    cin >> n;
    vector<Point> p(n);
    for(int i=0; i<n; ++i)
        cin >> p[i].x >> p[i].y;

    sortArgument(p);
    long long ans = 0;
    for(int i=0; i<n; ++i){
        Point a;
        for(int j=0; j<n; ++j){
            a += p[(i+j)%n];
            ans = max(ans, a.length2());
        }
    }
    printf("%.12f\n", sqrt((double)ans));

    return 0;
}


Measured memory_bytes: 256