/**
  * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_D
  * ????¨?
  * ?§???????????????? SS ???????????????????????§???hh:mm:ss ?????¢?????????????????????????????????????????????????????§???hh ????????????mm ??? 60 ???????????????ss ??? 60 ??????????§???¨????????????
  */
object Main {
  def main(args: Array[String]): Unit = {
    val seconds = io.StdIn.readInt()
    val hh = seconds / (60 * 60)
    val mm = (seconds - hh * 60 * 60) / 60
    val ss = seconds - hh * 60 * 60 - mm * 60
    println(s"$hh:$mm:$ss")
  }
}