h, m = map(int, input().split(':')) m += 5 if m >= 60: m %= 60 h += 1 h %= 24 ans = str(h).zfill(2) + ':' + str(m).zfill(2) print(ans)