s = raw_input() h = int(s[0:2]) m = int(s[3:5]) m += 5 h = (h+m/60) % 24 m = m % 60 print '%02d' % h + ':' + '%02d' % m