/**
 *      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;

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:
  Timer() : start_() { Initialize(); }
  double GetElapsedTime();

 private:
  int64_t start_;
  static constexpr int64_t clock_frequency_ = 2800000000;
  void Initialize();
  int64_t GetCycle();
};

double Timer::GetElapsedTime() {
  return static_cast<double>(GetCycle() - start_) /
         static_cast<double>(clock_frequency_);
}

void Timer::Initialize() {
  start_ = GetCycle();
}

int64_t Timer::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;

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

  double ans = 0.0;
  __gnu_cxx::sfmt19937_64 sfmt(1728);
  uniform_real_distribution<double> dist(0.0, 1.0);

  int loop = 0;

  while (true) {
    double theta = 2.0 * pi * dist(sfmt);
    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: 384