h, m = map(int, raw_input().split(':')) m += 5 h += m / 60 m = m % 60 h = h % 24 ansh = '' if h < 10: ansh = ansh + '0' ansh = ansh + str(h) ansm = '' if m < 10: ansm = ansm + '0' ansm = ansm + str(m) print ansh + ':' + ansm