"""
A program that reads a number of seconds, and displays it as a number of
hours, a number of minutes and a number of seconds.

* Input may not be negative
* Output is of the format: hours:minutes:seconds
* Output hours will range between 0 and 23

Some example outputs for given inputs:
12457   (3 : 27 : 37)
0       (0 : 0 : 0),
86399   (23 : 59 : 59)
86400   (0 : 0 : 0)
1000000 (13 : 46 : 40)
"""

#Get number of seconds
seconds = int(input("Give a number of seconds: "))

#If we have more than 24 hours, we drop some days
seconds %= 86400        # 86400 = 24*60*60

#Get the number of hours that's left
#We use the floor division operator (//) for this
hours = seconds//3600   # 3600 = 60*60
#Subtract the hours from the seconds
seconds %= 3600         # alternative: seconds -= hours*3600

#Repeat last two steps for the minutes
minutes = seconds//60     # 60 = 60
seconds %= 60

#Print what we have
print "(",hours,":",minutes,":",seconds,")"
