m = int(input()) / 100.0 * 60 hour = int(m // 60) + 10 min = int(round(m % 60)) print(str(hour).zfill(2) + ":" + str(min).zfill(2) + "\n")