h, m = map(int, input().replace(":", " ").split()) t = (h * 60 + m + 5) % (24 * 60) print("{:02d}:{:02d}".format(t // 60, t % 60))