time,spend=input().split()
hour=int(time.split(':')[0])
minute=int(time.split(':')[1])
now_spend=hour*60+minute+int(spend)
hour=str(now_spend//60%24)
minute=str(now_spend%60)
if len(minute)==2:
    minute=minute
else:
    minute='0'+minute
if len(hour)==2:
    hour=hour
else:
    hour='0'+hour
print(hour+":"+minute)