fun main() { val builder = StringBuilder() val (a, b, c) = readInputLine().split(" ").map { it.toLong() } val divisor = 60 * a - b if (divisor <= 0L) { builder.appendLine(-1) } else { builder.appendLine((3600 * c + (divisor - 1L)) / divisor) } print(builder.toString()) } fun readInputLine(): String { return readLine()!! }