#include <stdio.h>
int main(){
int h,m,munite,h2,m2;
scanf("%d:%d %d",&h,&m,&munite);
m2=(m+munite)%60;
h2=(m+munite)/60+h;
while(h2>24) h2-=24;
printf("%02d:%02d",h2,m2);
return 0;
}
int main(){
int h,m,munite,h2,m2;
scanf("%d:%d %d",&h,&m,&munite);
m2=(m+munite)%60;
h2=(m+munite)/60+h;
while(h2>24) h2-=24;
printf("%02d:%02d",h2,m2);
return 0;
}