int main()
{
int hour,minute,k,i;
scanf("%d:%d %d", &hour, &minute, &k);
hour += k / 60;
minute += k % 60;
while(minute >= 60)
{
minute -= 60;
hour += 1;
}
while(hour > 24)
{
hour -= 24;
}
printf("%02d:%02d", hour, minute);
return 0;
}