fun main(arg: Array<String>) {
    val N = nextInt()
    val A = listOfDouble()
    println(1.0 / A.fold(0.0) { acc, value -> acc + 1.0 / value})
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfDouble() = listOfString().map { java.lang.Double.parseDouble(it) } //{ it.toDouble() }
