object Main {
  def main(args: Array[String]) = {
    
    val input: String = readLine()
    val sec: Int = input.toInt

    val devideAndMod = (a: Int, b: Int) => (a / b, a % b)

    var (hour: Int, remainMin: Int) = devideAndMod(sec, 3600)
    var (minute: Int, remainSec: Int) = devideAndMod(remainMin, 60)
    
    println(hour + ":" + minute + ":" + remainSec)
  }  
  
  //def readLine(): String = {"46979"}
}
