import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] str=sc.nextLine().split("[: ]"); int hour=Integer.parseInt(str[0]); int minute=Integer.parseInt(str[1]); int k=Integer.parseInt(str[2]); hour=(hour+(k+minute)/60)%24; minute=(k%60+minute)%60; System.out.println(String.format("%02d", hour) + ":" + String.format("%02d", minute)); } }