h, m = map(int, input().split(':')) m += 5 if m >= 60: h += 1 m -= 60 result = '' if h == 24: result += '00' elif h < 10: result += '0' + str(h) else: result += str(h) result += ':' if m < 10: result += '0' + str(m) else: result += str(m) print(result)