a = int(input()) t = a // 100 h = (10 + t) % 24 m = int(a % 100 / 100 * 60) print(f'{h:02}:{m:02}')