s = input()
D = int(input())
for i in range(0, len(s)):
if s[i] == ':':
H = int(s[0 : i])
M = int(s[i+1 : len(s)])
if (M + D) >= 60 and (H + (M + D) // 60) < 24:
M = (M + D) % 60
H = H + (M + D) // 60
if (M + D) >= 60 and (H + (M + D) // 60) >= 24:
M = (M + D) % 60
H = (H + (M + D) // 60) % 24
if (M + D) < 60:
M = (M + D) % 60
if H < 10:
H = '0' + str(H)
if M < 10:
M = '0' + str(M)
print(str(H) + ':' + str(M))
慕用2276564
相关分类