from fractions import Fraction H, M, S = raw_input().split() H = int(H) M = int(M) S = S[3:].split('.') A = int(S[0]) - 9 B = 0 if len(S) <= 1 else int(S[1]) B = B * 6 H += A M += B H += B / 60 M %= 60 H %= 24 M = '0' + str(M) if M < 10 else str(M) print str(H) + ':' + str(M)