h, m = map(int, input().split(":")) h = (h + (m >= 55)) % 24 m = (m + 5) % 60 print(f"{h:02d}:{m:02d}")