a, b, S = input().rstrip().split() a = int(a) b = int(b) c = float(eval(S[3:])) - 9 c *= 60 d = b + int(c) b = d % 60 a += d // 60 if a > 23: a -= 24 elif a < 0: a = 24 + a print(f"{a:02}:{b:02}")