#include <stdio.h>
int main() {
    int h,m,k;
    scanf("%d:%d %d", &h, &m,&k);
    int b=m+k%60;
    if(0 <= h &&h<= 23&&0 <= m&&m<=59&&1 <= k)//限制条件
    {
            if(b<60)
            {
               printf("%02d:%02d",(h+k/60)%24,b);  //一天24h,如果结果h>24,%24即可
            }
            else {//b>=60 h就会变
            printf("%02d:%02d",(k/60+b/60+h)%24,b%60);
            }
    } 
    return 0;
}