h, m = gets.chomp.split(':').map(&:to_i) m += 5 if m > 60 h += 1 m %= 60 end h = 0 if h >= 24 printf "%02d:%02d\n", h, m