wake = input() min = int(wake[0])*600 + int(wake[1])*60 + int(wake[-2])*10 + int(wake[-1]) #ๅˆ†ใซ็›ดใ™ wakeAgain = (min + 5) % (24*60) print(str(wakeAgain//60//10) + str(wakeAgain//60%10) + ":" + str(wakeAgain%60//10) + str(wakeAgain%60%10))