h, m = gets.chomp.split(':').map(&:to_i) m += 5 if m > 60 h += 1 m -= 60 end h = 0 if h == 24 print "0" if h < 10 print "#{h}:" print "0" if m < 10 puts "#{m}"