import java.util.ArrayDeque; import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); int h=sc.nextInt(); int m=sc.nextInt(); String str=sc.next(); str=str.substring(3, str.length()); int add_m=(int)(Double.valueOf(str)*60+1e-6); m+=add_m; h=(h+m/60-9+24)%24; m%=60; if(m<0) { m+=60; h=(h-1+24)%24; } System.out.println((h<10?"0":"")+h+":"+(m<10?"0":"")+m); } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }