a = int(input().strip()) t = a * 60 // 100 hh = (10 + t // 60) % 24 mm = t % 60 print('{:02d}:{:02d}'.format(hh, mm))