#include <stdio.h>
int main() {
    int hour, minute, k;
    scanf("%d:%d %d", &hour, &minute, &k);
    int t1 = 0, t2 = 0,sum = 0;
    sum = hour*60+minute+k; //总时间,先累和再分算
    t1 = sum / 60;
    if (t1 > 24) {
        t1 = t1 % 24;
    };//防止输入时间大于24小时
    t2 = sum % 60;  //分钟
    printf("%02d:%02d", t1, t2);
    return 0;
}