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