import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String[] s = sc.nextLine().split("[: ]"); int h = Integer.parseInt(s[0]), m = Integer.parseInt(s[1]), t = Integer.parseInt(s[2]); m = m + t; h = (h + m/60)%24; m = m%60; System.out.printf("%02d:%02d", h, m); } }