h, m = map(int, input().split(':')) m += 5 if m >= 60: h += 1 m -= 60 if h == 24: h = 0 print(f"{h:02}:{m:02}")