import java.text.SimpleDateFormat; import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { Calendar cl = Calendar.getInstance(); String s = sc.next(); int h = Integer.parseInt(s.charAt(0)==0?s.substring(1,2):s.substring(0,2)); int m = Integer.parseInt(s.charAt(3)==0?s.substring(4,5):s.substring(3,5)); cl.set(Calendar.HOUR_OF_DAY, h); cl.set(Calendar.MINUTE, m); cl.add(Calendar.MINUTE, 5); SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); System.out.println(sdf.format(cl.getTime())); } }