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