#include<stdio.h>
int main()
{
    int hour = 0;
    int minute = 0;
    int k = 0;
    scanf("%d:%d %d", &hour, &minute, &k);
    minute = minute + k % 60;
    hour = hour + k / 60;
    if (minute >= 60)
    {
        minute = minute % 60;
        hour++;
    }
    hour = hour%24;
    if (hour > 9&&minute>9)
    {
        printf("%d:%d", hour, minute);
    }
    else if(hour <= 9 && minute > 9)
    {
        printf("0%d:%d", hour, minute);
    }
    else if (hour > 9 && minute <= 9)
    {
        printf("%d:0%d", hour, minute);
    }
    else
    {
        printf("0%d:0%d", hour, minute);
    }
    return 0;
}