int main(){
int hour = 0;
int minute = 0;
int k = 0;
scanf("%d:%d %d",&hour,&minute,&k);
if(minute+k%60>=60){
if((minute+k%60)%60==0)
printf("%2.d:%.2d",((hour+k/60)+1)%24,0);
else
{
printf("%.2d:%.2d",((hour+k/60)+1)%24,(minute+k%60)%60);
}
}
else
printf("%.2d:%.2d",(hour+k/60)%24,minute+k%60);
return 0;
}