from datetime import datetime, timedelta def main(): A, B, S = input().split() n = float(S[3:]) * 60 T = A + ':' + B d = datetime.strptime(T, '%H:%M') d = d + timedelta(minutes=n) print(d.strftime('%H:%M')) main()