h, m = gets.split(?:).take(2).map(&:to_i) puts "%02d:%02d" % ((h * 60 + m + 5) % 1440).divmod(60)