/*
1:20 100 结果应该为:3:00下面验算:
小时:hour = (hour + (20 +100) / 60 ) % 24
%24的原因是:题目要求只考虑时和分,不考虑日期
分钟:minute = (20+100) % 60 = 0
*/
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next(); // 记录hour:minute
int k = sc.nextInt(); // 记录k分钟
int index = 0; // 记录字符串中:的位置
for(int i = 0 ; i < str.length() ; i++) {
if(str.charAt(i) == ':') {
index = i;
break;
}
}
int hour = Integer.parseInt(str.substring(0,index)); // hour
int minute = Integer.parseInt(str.substring(index + 1, str.length())); // minute
hour = (hour + (k + minute) / 60 ) % 24;
minute = (k % 60 + minute) % 60;
System.out.println(String.format("%02d", hour) + ":" + String.format("%02d", minute));
}
}