a = int(input()) K = (a // 100) * 60 + (a % 100)/100 * 60 A = 10 + int(K) // 60 if int(K) % 60 < 10: H = '0' + str(int(K) % 60) else: H = int(K) % 60 Y = str(A) + ':' + str(H) print(Y)