fun main(args:Array) { val (cycle, income, obj) = readLine()!!.split(" ").map { it.toLong() } val batch = income + cycle - 1 val target = obj%batch println( cycle*(obj/batch) + target ) }