using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { var abs = ReadLine().Split(); var a = int.Parse(abs[0]); var b = int.Parse(abs[1]); var j = decimal.Parse(abs[2].Substring(3)) - 9; a += (int)Math.Floor(j) % 24; if ((j - (int)Math.Floor(j)) * 60 >= 60) a++; b += (int)(j - (int)Math.Floor(j)) * 60 % 60; WriteLine($"{a:00}:{b:00}"); } }