#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF=1e9,MOD=1e9+7,ohara=1e6+10;
const ll LINF=1e18;
using namespace std;
    
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl
#define doublecout(a) cout<<fixed<<setprecision(15)<<a<<endl;
#define Cerr(x) cerr<<(x)<<endl
#define fi first
#define se second
#define P pair<ll,ll> 
#define m_p make_pair
#define V vector<ll> 
#define U_MAP unordered_map<ll,ll>
#define pq priority_queue<ll>
#define rpq priority_queue<ll,vector<ll>,greater<ll>>
#define p_b push_back
    
ll n,cnt,a,b,c,d,tmpp,m,h,w,x[20],y[20],sum,pos,k;
ld doua;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
//int dy[]={-1,0,1,-1,1,-1,0,1};
//int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};
double ans=-1.0;
    
//-------------------------↓↓↓↓↓↓------------------------
    
//------ 自分を天才だと信じる ------
    
int main(void){
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    
    cin>>n;
    rep(i,n)cin>>x[i]>>y[i];
    vector<ll> p(n);
    rep(i,n)p[i]=i;
    do{
        double theta=0.0;
        double anss=0.0;
        ll bex=0,bey=0;
        rep(i,n){
            double nowtheta;
            if(x[p[i]]==bex){
                //Cout("A");
                if(y[p[i]]>bey){
                    nowtheta=90.0;
                }
                else{
                    nowtheta=270.0;
                }
            }
            else if(y[p[i]]==bey){
                if(x[p[i]]>bex){
                    nowtheta=0.0;
                }
                else{
                    nowtheta=180.0;
                }
            }
            else{
                //Cout("A");
                double tmp;
                tmp=(double)abs(y[p[i]]-bey)/(double)abs(x[p[i]]-bex);
                nowtheta=atan(tmp);
                nowtheta=nowtheta*180.0/M_PI;
                //doublecout(nowtheta/M_PI*180.0);
                if(x[p[i]]<bex&&y[p[i]]>bey){
                    nowtheta=180.0-nowtheta;
                }
                else if(x[p[i]]<bex&&y[p[i]]<bey){
                    nowtheta=nowtheta+180.0;
                }
                else if(x[p[i]]>bex&&y[p[i]]<bey){
                    nowtheta=360.0-nowtheta;
                }
            }
            anss+=min(abs(theta-nowtheta),360.0-abs(theta-nowtheta));
            theta=nowtheta;
            bex=x[p[i]];
            bey=y[p[i]];
            //Cout(anss);
            //cout<<bex<<" "<<bey<<"\n";
        }
        //cout<<"\n";
        double nowtheta;
            if(0==bex){
                //Cout("A");
                if(0>bey){
                    nowtheta=90.0;
                }
                else{
                    nowtheta=270.0;
                }
            }
            else if(0==bey){
                if(0>bex){
                    nowtheta=0.0;
                }
                else{
                    nowtheta=180.0;
                }
            }
            else{
                //Cout("A");
                double tmp;
                tmp=(double)abs(0-bey)/(double)abs(0-bex);
                nowtheta=atan(tmp);
                nowtheta=nowtheta*180.0/M_PI;
                if(0<bex&&0>bey){
                    nowtheta=180.0-nowtheta;
                }
                else if(0<bex&&0<bey){
                    nowtheta=nowtheta+180.0;
                }
                else if(0>bex&&0<bey){
                    nowtheta=360.0-nowtheta;
                }
            }
           // Cout(anss);
            anss+=min(abs(theta-nowtheta),360.0-abs(theta-nowtheta));
            theta=nowtheta;
        //cout<<x[p[1]]<<" "<<y[p[1]]<<"\n";
        //Cout(anss);
        //cout<<"\n";
        if(ans==-1.0)ans=anss;
        else ans=min(ans,anss);
    }while(next_permutation(all(p)));
    doublecout(ans);
    return 0;
}


Measured memory_bytes: 3636