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