import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); System.out.println(solve(S)); } static int p(String S){ return Integer.parseInt(S); } static long second(String S){ String [] arr = S.split(":"); int hour = p(arr[0])-9; int min = p(arr[1]); int t = (hour*60+min)*60*1000; return t; } static String solve(String S){ long now = second(S); long after = now + 300000; Date d = new Date(); d.setTime(after); String T = d.toString(); return T.substring(11,16); } }