h,m=gets.chomp.split(":").map{|e| e.to_i} h=h+((m+5>59)?1:0) printf("%02d:%02d",h%24,(m+5)%60)