import scala.annotation.tailrec

object Main extends App {

  @tailrec
  def gcd(x: Int, y: Int): Int = if (y == 0) x else gcd(y, x % y)

  def lcm(x: Int, y: Int): Int = if (x == 0 || y == 0) 0 else (x * y) / gcd(x, y)

  val sc = new java.util.Scanner(System.in)
  val x :: xs = List.fill(sc.nextInt())(sc.nextInt())
  val (numerator, denominator) = xs.foldLeft(1 -> x) {
    case ((count, l), r) =>
      val denominator = lcm(l, r)
      (count * (denominator / l) + (denominator / r)) -> denominator
  }
  println(1.0 / (numerator.toDouble / denominator))
}
