/**
 *      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_(std::chrono::system_clock::now()),
        stop_(std::chrono::system_clock::now()) {}
  void Start();
  void Stop();
  double GetElapsedTime();

 private:
  std::chrono::system_clock::time_point start_;
  std::chrono::system_clock::time_point stop_;
};

void Timer::Start() { start_ = std::chrono::system_clock::now(); }

void Timer::Stop() { stop_ = std::chrono::system_clock::now(); }

double Timer::GetElapsedTime() {
  return std::chrono::duration_cast<std::chrono::milliseconds>(stop_ - start_)
      .count();
}

const int64_t CYCLES_PER_SEC = 2800000000;

struct Timer2 {
	int64_t start;
	Timer2() { reset(); }
	void reset() { start = getCycle(); }
	void plus(double a) { start -= (a * CYCLES_PER_SEC); }
	inline double get() { return (double)(getCycle() - start) / CYCLES_PER_SEC; }
	inline int64_t getCycle() {
		uint32_t low, high;
		__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
		return ((int64_t)low) | ((int64_t)high << 32);
	}
};

int main(){
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);

  Timer2 time;
  //time.Start();

  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 (1) {
    double theta = 2.0 * pi * dist(sfmt);
    ans = max(ans, calc(theta));
    ++loop;
    if (loop % 100 == 0) {
      double ti = time.get();
      if (ti > 1.95) break;
    }
  }
  //debug(loop);
  cout << setprecision(15) << ans << endl;

  return 0;
}