import java.util.*; public class Main { public static void main(String[] args){ Main main = new Main(); main.solveA(); } private void solveA() { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); int h = c2i(line.charAt(0)) * 10 + c2i(line.charAt(1)); int m = c2i(line.charAt(3)) * 10 + c2i(line.charAt(4)); m += 5; if (m > 60) { m -= 60; h += 1; h = h % 24; } System.out.printf("%02d:%02d", h, m); } private int c2i(char c) { return c - '0'; } }