t = input() hh = int(t[:2]) mm = int(t[-2:]) mm += 5 if mm >= 60: mm -= 60 hh = (hh + 1) % 24 ans = str(hh).zfill(2) + ":" + str(mm).zfill(2) print(ans)