T = input() hh, mm = list(map(int, T.split(':'))) mm += 5 hh += (mm // 60) hh %= 24 mm %= 60 print(':'.join(['%02d'%hh, '%02d'%mm]))