import scala.io.StdIn.readLine
import scala.concurrent.duration.DurationInt

object Main {
  def main(args: Array[String]) {
    val input = readLine().toInt
    val convertSeconds = input.seconds
    val convertMinutes = convertSeconds.toMinutes.toInt
    val convertHours = convertSeconds.toHours

    val hours = convertHours.toInt
    val minutes = convertMinutes.toInt - hours * 60
    val seconds = input - hours * 60 * 60 - minutes * 60

    println(s"$hours:$minutes:$seconds")
  }
}