time=input() t=time.split(":") minute=int(t[1])+5 if minuts<60: t[1]='{0:02d}'.format(minute) else: hour=int(t[0]+1) if hour<24: t[0]='{0:02d}'.format(hour) else: t[0]='{0:02d}'.format(0) t[1]='{0:02d}'.format(minute-60) print(t[0]+':'+t[1])