def minute_to_time(t:int): return "{:02}:{:02}".format(t // 60,t % 60) start = 10 * 60 distance = int(input()) minute = int(distance / 100 * 60) print(minute_to_time(start + minute))