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