/*  -*- coding: utf-8 -*-
 *
 * 3066.cc: Satake likes straight
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 9;
const int NBITS = 1 << MAX_N;
const double PI = acos(-1.0);
const double DINF = 1e60;

/* typedef */

template <typename T>
struct Pt {
  T x, y;

  Pt() {}
  Pt(T _x, T _y) : x(_x), y(_y) {}
  Pt(const Pt<T> &pt) : x(pt.x), y(pt.y) {}

  Pt<T> operator+(const Pt<T> pt) const { return Pt<T>(x + pt.x, y + pt.y); }
  Pt<T> operator-() const { return Pt<T>(-x, -y); }
  Pt<T> operator-(const Pt<T> pt) const { return Pt<T>(x - pt.x, y - pt.y); }
  Pt<T> operator*(T t) const { return Pt<T>(x * t, y * t); }
  Pt<T> operator/(T t) const { return Pt<T>(x / t, y / t); }
  T dot(Pt<T> v) const { return x * v.x + y * v.y; }
  T cross(Pt<T> v) const { return x * v.y - y * v.x; }
  Pt<T> mid(const Pt<T> pt) { return Pt<T>((x + pt.x) / 2, (y + pt.y) / 2); }
  T d2() { return x * x + y * y; }
  double d() { return sqrt(d2()); }

  Pt<T> normalize() {
    double d0 = d();
    return (d0 != 0.0) ? Pt<T>(x / d0, y / d0) : *this;
  }

  void print() { printf("(%d,%d)", x, y); }
};

typedef Pt<double> pt;

/* global variables */

pt ps[MAX_N], nvs[MAX_N][MAX_N];
double dp[NBITS][MAX_N][MAX_N];

/* subroutines */

inline void setmin(double &a, double b) { if (a > b) a = b; }

/* main */

int main() {
  int n;
  scanf("%d", &n);
  n++;

  ps[0] = pt(0.0, 0.0);
  for (int i = 1; i < n; i++) scanf("%lf%lf", &ps[i].x, &ps[i].y);

  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (i != j)
	nvs[i][j] = (ps[j] - ps[i]).normalize();

  int nbits = 1 << n;
  for (int bits = 0; bits < nbits; bits++)
    for (int i = 0; i < n; i++)
      fill(dp[bits][i], dp[bits][i] + n, DINF);

  for (int i = 1, bi = 1 << 1; i < n; i++, bi <<= 1)
    dp[1 | bi][0][i] = acos(nvs[0][i].x);

  for (int bits = 0; bits < nbits; bits++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
	if (dp[bits][i][j] < DINF)
	  for (int k = 0, bk = 1; k < n; k++, bk <<= 1)
	    if (! (bits & bk))
	      setmin(dp[bits | bk][j][k],
		     dp[bits][i][j] + acos(nvs[i][j].dot(nvs[j][k])));

  double mind = DINF;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (dp[nbits - 1][i][j] < DINF)
	setmin(mind, dp[nbits - 1][i][j] + acos(nvs[i][j].dot(nvs[j][0])));

  printf("%.8lf\n", mind * 180 / PI);
  return 0;
}

