import java.util.Arrays; import java.util.Scanner; public class Solution{ static Scanner s=new Scanner(System.in); public static void main(String[]__){ int[] in=Arrays.stream(s.next().split(":")).mapToInt(Integer::parseInt).toArray(); if(in[1]>54) { in[0]++; in[0]%=24; in[1]-=60; } in[1]+=5; System.out.printf("%02d:%02d\n",in[0],in[1]); } }