V = int(input()) h = (V //100 + 10)%24 m = V % 100 * 0.6 print('%d:%02d' % (h, m))