#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<double> VD;
typedef vector<VD> VVD;

template<typename T> void chmin(T &a, T b) { if (a > b) a = b; }
template<typename T> void chmax(T &a, T b) { if (a < b) a = b; }

int in() { int x; scanf("%d", &x); return x; }
ll lin() { ll x; scanf("%lld", &x); return x; }

const double pi = acos(-1.0);

double calc(double x, double y){
    return fmin(fmin(fabs(x - y), fabs(x - y + 2 * pi)), fabs(x - y - 2 * pi));
}

int main() {
    int n;
    cin >> n;
    VD x(n), y(n);
    REP(i,n){
        cin >> x[i] >> y[i];
    }
    VI p(n);
    REP(i,n) p[i] = i;
    double ans = 1e9;
    do {
        double s = 0.0, t = 0.0;
        double xp = 0.0, yp = 0.0;
        REP(i,n){
            double xq = x[p[i]], yq = y[p[i]];
            double u = atan2(yq - yp, xq - xp);
            // cout << t * 180 / pi << " " << u * 180 / pi << endl;
            s += calc(t, u);
            xp = xq;
            yp = yq;
            t = u;
        }
        s += calc(t, atan2(-yp, -xp));
        ans = fmin(ans, s);
    }while (next_permutation(ALL(p)));
    ans *= 180.0 / pi;
    printf("%.15f\n", ans);
    return 0;
}

