using System; namespace _652 { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(); var x = double.Parse(s[2].Substring(3, s[2].Length - 3)); double a = 60 * x + 900; if (1 - (x % 1) < 0.001) a++; double time = int.Parse(s[0]) * 60 + int.Parse(s[1]); time += a; double hour = time / 60 % 24; if (hour < 10) Console.Write(0); Console.Write((int)hour + ":"); double minute = time % 60; if (minute < 10) Console.Write(0); Console.WriteLine((int)minute); } } }