h, m = gets.chomp.split(':').map(&:to_i) dest = (60 * h + m + 5) % 1440 puts format("%02d:%02d", dest / 60, dest % 60)