function Main(input) { var data = input.split(":") var hh = parseInt(data[0]); var mm = parseInt(data[1]); justDoIt(hh,mm); } function justDoIt (hh,mm){ if ( mm + 5 > 59) { if( hh >= 0 && hh <= 8) { console.log( "0" + (hh + 1) + ":0" + (mm + 5) % 60 + "\n"); } else if ( hh == 23) { console.log( "00:0" + (mm + 5) % 60 + "\n"); } else { console.log( (hh + 1) + ":0" + (mm + 5) % 60 + "\n"); } } else { if ( hh >= 0 && hh <= 9) { if( (mm + 5) <= 9 ){ console.log("0" + hh + ":0" + (mm + 5) + "\n"); } else { console.log("0" + hh + ":" + (mm + 5) + "\n"); } } else { console.log( hh + ":" + (mm + 5) + "\n"); } } } Main(require("fs").readFileSync("/dev/stdin", "utf8"));