#! /usr/bin/env python

# -*- coding: utf-8 -*-



import sys



def time(s):

    h = s / 3600

    m = (s - (h * 3600)) / 60

    s = (s - (h * 3600)) - (m * 60)

    h, m, s = list(map(str, (h, m, s)))

    print("%s:%s:%s" % (h, m, s))



s = int(input())



if 0 <= s <= 86400:

    time(s)

else:

    sys.exit(0)
#! /usr/bin/env python

# -*- coding: utf-8 -*-



raw_time = int(input())



if 0 <= raw_time < 86400:

    hour = raw_time / 3600

    minute = (raw_time - hour * 3600) / 60

    second = (raw_time - hour * 3600 - minute * 60)

    print(("%d:%d:%d") % (hour, minute, second))
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys


def time(s):
    h = s / 3600
    m = (s - (h * 3600)) / 60
    s = (s - (h * 3600)) - (m * 60)
    h, m, s = list(map(str, (h, m, s)))
    print("%s:%s:%s" % (h, m, s))


s = int(input())
if 0 <= s <= 86400:
    time(s)
else:
    sys.exit(0)

#! /usr/bin/env python
# -*- coding: utf-8 -*-
raw_time = int(input())
if 0 <= raw_time < 86400:
    hour = raw_time / 3600
    minute = (raw_time - hour * 3600) / 60
    second = raw_time - hour * 3600 - minute * 60
    print(("%d:%d:%d") % (hour, minute, second))

-import sys - - -def time(s): -    h = s / 3600 -    m = (s - (h * 3600)) / 60 -    s = (s - (h * 3600)) - (m * 60) -    h, m, s = list(map(str, (h, m, s))) -    print("%s:%s:%s" % (h, m, s)) - - -s = int(input()) -if 0 <= s <= 86400: -    time(s) -else: -    sys.exit(0) +raw_time = int(input()) +if 0 <= raw_time < 86400: +    hour = raw_time / 3600 +    minute = (raw_time - hour * 3600) / 60 +    second = raw_time - hour * 3600 - minute * 60 +    print(("%d:%d:%d") % (hour, minute, second))