int main()
{
int a_1 = 0,a_2 = 0,a_3 = 0;
int b = 0;
int c = 0;
int d = 0;
scanf("%d:%d %d", &a_1,&a_2,&a_3);
c = (a_1 * 60 + a_2 + a_3) / 60;
d = (a_1 * 60 + a_2 + a_3) % 60;
if (c > 24)
{
c %= 24;
printf("%02d:%02d\n", c, d);
}
else
{
printf("%02d:%02d\n", c, d);
}
return 0;
}