# No.651 E869120 and Driving a = int(input()) h = a // 100 + 10 m = (a % 100) / 100 * 60 print(str(h) + ':' + '{0:02d}'.format(int(m)))