/**
 *      purpose : 
 *      author  : kyomukyomupurin
 *      created : 
**/

// input/output
#include <fstream>
#include <iostream>
#include <sstream>
// container class
#include <array>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
// math, algorithm
#include <algorithm>
#include <cmath>
#include <complex>
#include <numeric>
// etc
#include <bitset>
#include <cassert>
#include <cctype>
#include <cstring>
#include <chrono>
#include <ext/random>
#include <ext/rope>
#include <functional>
#include <iomanip>
#include <random>
#include <utility>
// using-directive
using namespace std;
// alias template
using int64 = long long;
using ull = unsigned long long;
using vi = std::vector<int>;
using vl = std::vector<int64>;
using pii = std::pair<int, int>;
using pll = std::pair<int64, int64>;
// text macro replacement
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(_) (_).begin(), (_).end()
#define rall(_) (_).rbegin(), (_).rend()
#define print(_) std::cout << (_) << '\n'
#define debug(_) std::cerr << #_ << ": " << (_) << '\n'
// variadic template
template<typename T> inline void chmin(T &a, T b) {if (a > b) a = b; return;}
template<typename T> inline void chmax(T &a, T b) {if (a < b) a = b; return;}
template<typename T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
  os << '{';
  for (size_t i = 0; i < vec.size(); ++i) {
    os << vec[i];
    if (i != vec.size() - 1) os << ',';
  }
  os << '}';
  return os;
}
template<typename T, typename U> std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) {
  return os << '{' << p.first << " " << p.second << '}';
}
// constant
constexpr int INF = std::numeric_limits<int>::max() / 2;  // 1.073741823e9
constexpr int64 INF64 = std::numeric_limits<int64>::max() / 2;  // 4.611686018427387903e18
constexpr int MOD = 1000000007;

class Xorshift128plus {
 public:
  Xorshift128plus() {
    seed0_ = static_cast<uint64_t>(std::chrono::steady_clock::now().time_since_epoch().count());
    seed1_ = static_cast<uint64_t>(std::chrono::steady_clock::now().time_since_epoch().count());
  }
  using result_type = uint64_t;
  static constexpr uint64_t min() {return std::numeric_limits<result_type>::min();}
  static constexpr uint64_t max() {return std::numeric_limits<result_type>::max();}
  uint64_t operator()() { return GetNext(); }

 private:
  uint64_t result_;
  uint64_t seed0_;
  uint64_t seed1_;
  uint64_t GetNext() {
    uint64_t s1 = seed0_;
    uint64_t s0 = seed1_;
    result_ = s0 + s1;
    seed0_ = s0;
    s1 ^= s1 << 23;
    seed1_ = s1 ^ s0 ^ (s1 >> 18) ^ (s0 >> 5);
    return result_;
  }
};

const double pi = acos(-1);
vector<double> x(100), y(100);
int n;

double calc(double theta) {
  double res = 0.0;
  double dx = cos(theta), dy = sin(theta);
  for (int i = 0; i < n; ++i) {
    res += max(0.0, dx * x[i] + dy * y[i]);
  }
  return res;
}

class Timer {
 public:
  double GetElapsedTime() {
    return static_cast<double>(GetCycle() - start_) /
           static_cast<double>(clock_frequency_);
  }
  void Start() { start_ = GetCycle(); }

 private:
  int64_t start_;
  static constexpr int64_t clock_frequency_ = 2800000000;
  int64_t GetCycle() {
    uint32_t low, high;
    __asm__ volatile("rdtsc" : "=a"(low), "=d"(high));
    return (static_cast<int64_t>(low)) | (static_cast<int64_t>(high) << 32);
  }
};
int main(){
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);

  Timer time;
  time.Start();

  cin >> n;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];

  double ans = 0.0;
  Xorshift128plus xor128;
  uniform_real_distribution<double> dist(0.0, 1.0);

  int loop = 0;

  while (true) {
    double theta = 2.0 * pi * dist(xor128);
    ans = max(ans, calc(theta));
    ++loop;
    if (loop % 100 == 0) {
      double ti = time.GetElapsedTime();
      if (ti > 1.99) break;
    }
  }
  //debug(loop);
  cout << setprecision(15) << ans << endl;

  return 0;
}


Measured memory_bytes: 768