hh, mm, ss = map(int, input().strip('\n').split(':'))
x = int(input())
x, new_ss = divmod(x + ss, 60) # 对 ss + x 同时进行取模和整除操作
x, new_mm = divmod(x + mm, 60) # divmod会返回商和余数2个参数
x, new_hh = divmod(x + hh, 24)
print(f'{new_hh:0>2d}:{new_mm:0>2d}:{new_ss:0>2d}')