/**
 *      purpose : 
 *      author  : kyomukyomupurin
 *      created : 
**/
#include <ext/random>
// 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 <functional>
#include <iomanip>
#include <random>
#include <utility>
// using-directive
using namespace std;
// alias template
using int64 = long long;
using uint64 = unsigned long long;
using vi = std::vector<int>;
using vl = std::vector<int64>;
using pii = std::pair<int, int>;
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'
#define dbg(vec) for (size_t _ = 0; _ < vec.size(); ++_){std::cerr << #vec << "[" << _ << "] : " << vec[_] << '\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;}
// constant
const int INF = (1<<30) - 1;  // 1.073741823e9
const int64 INF64 = (1LL<<62) - 1;  // 4.611686018427387903e18
const int MOD = 1000000007;

const double pi = 3.141592653589793;
vector<double> x(101), y(101);
int n; 

inline double naiseki(const double& x1, const double& y1, const double& x2, const double& y2) {
  return x1 * x2 + y1 * y2;
}

// 角度 theta の方向を最終的に向くとして計算
// theta は radian
double calc(const double& theta) {
  double res = 0.0;
  double dx = cos(theta), dy = sin(theta);
  for (int i = 0; i < n; ++i) {
    res += max(0.0, naiseki(dx, dy, x[i], y[i]));
  }
  return res;
}

class Timer{
 public:
  Timer(std::chrono::system_clock::time_point start = std::chrono::system_clock::now(), std::chrono::system_clock::time_point stop = std::chrono::system_clock::now()) : start_(start), stop_(stop) {}
  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();
}

class RandomNumberGenerator {
 public:
  RandomNumberGenerator() : rng_(std::chrono::steady_clock::now().time_since_epoch().count()) {}
  int RandomInt(int a, int b);
  long long RandomInt64(long long a, long long b);
  double RandomDouble(double a, double b);
 private:
  __gnu_cxx::sfmt19937_64 rng_;
};

// return [a, b]
int RandomNumberGenerator::RandomInt(int a, int b) {
  std::uniform_int_distribution<int> distribution(a, b);
  return distribution(rng_);
}

long long RandomNumberGenerator::RandomInt64(long long a, long long b) {
  std::uniform_int_distribution<long long> distribution(a, b);
  return distribution(rng_);
}

double RandomNumberGenerator::RandomDouble(double a, double b) {
  std::uniform_real_distribution<double> distribution(a, b);
  return distribution(rng_);
}

int main(){
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  Timer time;
  time.Start();
  cin >> n;
  rep(i, n) cin >> x[i] >> y[i];

  double ans = 0.0;

  RandomNumberGenerator rng;

  do {
    double theta = 2.0 * pi * rng.RandomDouble(0.0, 1.0);
    chmax(ans, calc(theta));
    time.Stop();
  } while (time.GetElapsedTime() <= 1997);

  cout << setprecision(15) << ans << '\n';
  return 0;
}


Measured memory_bytes: 384