import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0525_2 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String[] input = br.readLine().split(":"); int hour = Integer.parseInt(input[0]); int minute = Integer.parseInt(input[1]); minute += 5; hour = (minute > 59)? hour +1 : hour; System.out.println(String.format("%02d:%02d", hour % 24, minute % 60)); } catch (IOException e) { e.printStackTrace(); } } }