#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cstdint>
using namespace std;
typedef long long ll;
#define MP make_pair
#define PB push_back
#define inf 1000000007
#define mod 1000000007
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define EPS 1e-10

typedef complex<double> C;

const double PI = 4*atan(1.0);

bool eq(double a,double b)
{
  return (-EPS<a-b&&a-b<EPS);
}

namespace std
{
    bool operator < (const C a, const C b) {
        return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
    }
    bool operator > (const C a, const C b) {
        return a.real() != b.real() ? a.real() > b.real() : a.imag() > b.imag();
    }
    bool operator==(const C a, const C b){
        return (eq(a.real(),b.real()) && eq(a.imag(),b.imag()));
    }
    bool operator!=(const C a, const C b){
        return !(a == b);
    }
    C operator* (const C a, const C b){
        return C(a.real()*b.real()-a.imag()*b.imag(),a.real()*b.imag()+a.imag()*b.real());
    }
}

//条件付きsqrt
double Sqrt(double x)
{
    if(x<0) return 0;
    else    return sqrt(x);
}

//正規化
C normalize(C c)
{
    return c / abs(c);
}

//角度(rad)
double getarg(C a,C b){
    return arg(b*conj(a));
}

//外積
double cross(const C a, const C b)
{
    return imag(conj(a)*b);
}
//内積
double dot(const C a, const C b)
{
    return real(conj(a)*b);
}

//bを中心としてaをth(rad)回転
C rot(C a,C b,double th)
{
    return b + (a-b) * C(cos(th),sin(th));
}

int ccw(C a, C b, C c)
{
    b -= a; c -= a;
    if(cross(b, c) > 0)   return +1;       // counter clockwise
    if(cross(b, c) < 0)   return -1;       // clockwise
    if(dot(b, c) < 0)     return +2;       // c--a--b on line
    if(norm(b) < norm(c)) return -2;       // a--b--c on line
    return 0;   // a--c--b on line
}

double dp[10][10][1<<9];
vector<double> x,y;
double calc(int i,int j,int k){
    C c1(x[i]-x[j],y[i]-y[j]);
    C c2(x[k]-x[i],y[k]-y[i]);
    return abs(getarg(c1,c2)/M_PI*180.0);
}

int main(){
    int n;
    cin >> n;
    x.resize(n);
    y.resize(n);
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    
    // rep(i,n+1){
    //     rep(j,n+1){
    //         rep(k,1<<n){
    //             dp[i][j][k] = inf;
    //         }
    //     }
    // }
    // rep(i,n+1){
    //     if(i==0)continue;
    //     C c1(1,0);
    //     C c2(x[i],y[i]);
        
    //     dp[i][0][1<<(i-1)] = abs(getarg(c1,c2)/M_PI*180.0);
    //     //cerr << i << " " << 0 << " " << dp[i][0][1<<(i-1)] << endl;
    // }
    
    // rep(i,n+1){
    //     if(i==0)continue;
    //     rep(j,n+1){
    //         rep(k,1<<n){
    //             if(abs(dp[i][j][k]-inf)<=EPS){
    //                 continue;
    //             }
    //             //cerr << i << " " << j << " " << k << endl;
    //             rep(l,n){
    //                 if((k>>l)&1){

    //                 }else{
    //                     int id = l+1;
    //                     //cerr << id << endl;
    //                     dp[id][i][k^(1<<l)] = min(dp[id][i][k^(1<<l)],dp[i][j][k]+calc(i,j,id));
    //                     //cerr << dp[id][i][k^(1<<l)] << endl;
    //                 }
    //             }
    //         }
    //     }
    // }
    // double mi = inf;
    // rep(i,n+1){
    //     rep(j,n+1){
    //         if(i==0||j==0)continue;
    //         if(i==j)continue;
    //         //cerr << i << " " << j << " " << dp[i][j][(1<<n)-1]  << " " <<  calc(i,j,0) << endl;
    //         mi = min(mi,dp[i][j][(1<<n)-1] + calc(i,j,0));
    //     }
    // }
    vector<int>v(n);
    rep(i,n){
        v[i] = i;
    }
    double mi = inf;
    do{
        C c1(1,0);
        C p(0,0);
        double tmp  = 0;
        rep(i,n){
            C c2(x[v[i]]-p.real(),y[v[i]]-p.imag());
            tmp +=  abs(getarg(c1,c2)/M_PI*180.0);
            p = C(x[v[i]],y[v[i]]);
            c1 = c2;
            //cerr << p << " " << c2 << endl;
        }
        C c3(-x[v[n-1]],-y[v[n-1]]);
        tmp +=  abs(getarg(c1,c3)/M_PI*180.0);
            
        mi = min(mi,tmp );

    }while(next_permutation(v.begin(),v.end()));
    cout.precision(20);
    cout << mi << endl;
    return 0;
}


Measured memory_bytes: 3596