fun main(args: Array<String>) {
    val numberA = readLine()!!.toInt()
    var numberList = mutableListOf<Long>()
    for (i in 0 until numberA){
        numberList.add(readLine()!!.toLong())
    }

    while (true){
        if(numberList.size == 1){
            break
        }
        val kobaiList = mutableListOf<Long>()
        for (i in 0 until numberList.size-1){
            kobaiList.add((numberList[i] / gcd(numberList[i],numberList[i+1])) * numberList[i+1])
        }
        numberList.clear()
        numberList=kobaiList

    }
    println(numberList[0])
}
fun gcd(a: Long, b: Long) : Long {
    var A = a
    var B = b
    while (b != 0L){
        if (A<B){
            val C = A
            A=B
            B=C
        }
        else if (B == 0L){
            break
        }else{
            val C=A
            A=B
            B=C%B
        }
    }
    return A
}