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

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

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

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

class Xorshift128plus {
 public:
  using result_type = uint64_t;
  static constexpr uint64_t min() { return numeric_limits<result_type>::min(); }
  static constexpr uint64_t max() { return numeric_limits<result_type>::max(); }
  uint64_t operator () () { return GetNext(); }
  void Initialize();

 private:
  static uint64_t result_;
  static uint64_t seed0_;
  static uint64_t seed1_;
  void Next();
  uint64_t GetNext();
};

uint64_t Xorshift128plus::result_;
uint64_t Xorshift128plus::seed0_ = static_cast<uint64_t>(std::chrono::steady_clock::now().time_since_epoch().count() - 172817281728);
uint64_t Xorshift128plus::seed1_ = static_cast<uint64_t>(std::chrono::steady_clock::now().time_since_epoch().count() + 172817281728);

inline void Xorshift128plus::Initialize() {
  for (int i = 0; i < 10; ++i) {
    Next();
  }
}

inline void Xorshift128plus::Next() {
  uint64_t s1 = seed0_;
  uint64_t s0 = seed1_;
  result_ = s0 + s1;
  seed0_ = s0;
  s1 ^= s1 << 23;
  seed1_ = s1 ^ s0 ^ (s1 >> 18) ^ (s0 >> 5);
}

inline uint64_t Xorshift128plus::GetNext() {
  Next();
  return result_;
}

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;
  Xorshift128plus xor128;
  xor128.Initialize();
  int loop = 0;
  uniform_real_distribution<double> dist(0.0, 1.0);
  do {
    double theta = 2.0 * pi * dist(xor128);
    chmax(ans, calc(theta));
    ++loop;
    if (loop % 1000 == 0){
      time.Stop();
    }
  } while (time.GetElapsedTime() <= 1950);

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


Measured memory_bytes: 256