import re T = input() match = re.match(r'(\d\d):(\d\d)', T) h, m = int(match.group(1)), int(match.group(2)) m += 5 if m >= 60: h += 1 m %= 60 if h == 24: h = 0 print('{0:02d}:{1:02d}'.format(h, m))