import java.io.*; import java.util.*; public class Main_yukicoder525 { private static Scanner sc; private static Printer pr; private static void solve() { String[] hm = sc.next().split(":"); int hh = Integer.parseInt(hm[0]); int mm = Integer.parseInt(hm[1]); hh = (hh + (mm + 5) / 60) % 24; mm = (mm + 5) % 60; pr.printf("%02d:%02d\n", hh, mm); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }