import scala.io.StdIn.readInt

object Main extends App {
  val s = readInt

  val (h, baseMin) = (s / (60 * 60), s % (60 * 60))
  val (m, sec) = (baseMin / 60, baseMin % 60)

  println(s"$h:$m:$sec")

}

