T = input() h, m = map(int, T.split(':')) d, m = divmod(m + 5, 60) h = (h + d) % 24 print('{:0>2}:{:0>2}'.format(h, m))