import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        // 0到":" 的下标就是小时的下标,再通过Integer.parseInt(String类型)强转为int
        int i = str.indexOf(":");
        //" "到str.length()的下标就是分钟的下标,和上面一样
        int j = str.indexOf(" ");
        
        String x = str.substring(0, i);//输入的小时
        String y = str.substring(j + 1, str.length());//输入的总分种
        String z = str.substring(i + 1, j);//输入的分钟
        
        int a = Integer.parseInt(x);
        int b = Integer.parseInt(y);
        int c = Integer.parseInt(z);
        
        int h = ((b + c) / 60 + a) % 24;
        int m = (b + c) % 60;
        if(h >= 1) {   
            if(h < 10 && m < 10) {
                System.out.println("0" + h + ":0" + m);
            } else if (h < 10 && m >= 10) {
                System.out.println("0" + h + ":" + m);
            } else if (h >= 10 && m < 10) {
                System.out.println(h + ":0" + m);
            } else {
                System.out.println(h + ":" + m);
            }
        } else if (h < 1){
            if(m >= 10) {
                System.out.println("00:" + m);
            } else {
                System.out.println("00:0" + m);
            }
        }
    }
}