import io.StdIn.readLine

object Main extends App {
  val s = readLine.toInt

  @scala.annotation.tailrec
  def loop(s: Int, str: String = "", n: Int = 3600): String = n match {
    case 3600 => loop(s % n, s"${s / n}", n / 60)
    case 60 => loop(s % n, s"${str}:${s / n}", n / 60)
    case 1 => s"${str}:${s}"
  }

  val result = loop(s)
  println(result)
}

