object Main extends App {
  import scala.io.StdIn._
  val n = readInt()
  val points = Array.fill(n){
    val Array(x, y) = readLine.trim.split(' ').map(_.toDouble)
    Point(x, y)
  }
  var minTurn = Double.MaxValue
  for (shops ← points.permutations) {
    minTurn = math.min(minTurn, shops.foldLeft((Point(-1, 0), Point(0, 0), 0d)){
      case ((prev, current, sum), next) ⇒ (current, next, math.acos((current - prev).angleFrom(next - current).cos) * 180 / math.Pi + sum)
    } match {case (prev, current, sum) ⇒ math.acos((current - prev).angleFrom((Point(0, 0) - current)).cos) * 180 / math.Pi + sum})
  }
  println(f"$minTurn%.10f")
}
case class Point(x: Double, y: Double) {
  def -(that: Point): Vector = Vector(x - that.x, y - that.y)
}
case class Vector(x: Double, y: Double) {
  def length: Double = math.sqrt(x * x + y * y)
  def dot(that: Vector): Double = x * that.x + y * that.y
  def cross(that: Vector): Double = x * that.y - y * that.x
  def angleFrom(that: Vector): Angle = length * that.length match {case len ⇒ Angle(cross(that) / len, dot(that) / len)}
}
case class Angle(sin: Double, cos: Double)
