#include <bits/stdc++.h>
using namespace std;
vector<complex<double> > nu;
int half(complex<double> a) { return imag(a) > -1e-9; }
bool cmp(const complex<double> &a, const complex<double> &b) {
  if (half(a) + half(b) == 1) return arg(a) > arg(b);
  return arg(a) < arg(b);
}
int main() {
  int a, b;
  int n;
  int i;
  double maxD, d;
  while (scanf("%d", &n) != EOF) {
    nu.clear();
    for (i = 0; i < n; i++) {
      scanf("%d%d", &a, &b);
      try {
        nu.push_back(complex<double>(a, b));
      } catch (...) {
        while (1)
          ;
      }
    }
    stable_sort(nu.begin(), nu.end(), cmp);
    maxD = 0;
    for (i = 0; i < n; i++) {
      d = (arg(nu[(i + 1) % n]) - arg(nu[i])) * 180.0 / acos(-1.0);
      if (d < -1e-7) d += 360.0;
      maxD = max(maxD, d);
    }
    printf("%.7lf\n", maxD < 1e-6 ? 0.0 : 360.0 - maxD);
  }
  return 0;
}
