import scala.io.StdIn.readInt
import scala.annotation.tailrec

object Main extends App {

  val n = readInt()

  val (h, m, s) = solve(n)
  println(s"$h:$m:$s")

  def solve(n: Int): (Int, Int, Int) = {
    @tailrec
    def go(h: Int, m: Int, s: Int): (Int, Int, Int) = {
      if (s >= 3600)
        go(h + 1, m, s - 3600)
      else if (s >= 60)
        go(h, m + 1, s - 60)
      else
        (h, m, s)
    }

    go(0, 0, n)
  }
}

