h, m, k = map(int, input().replace(":", " ").split(" "))
h = (h + (m+k) // 60) % 24
m = (m+k) % 60
print("%02d:%02d" % (h, m))