print((function (f, h, m) m = tonumber(m)+5 h = tonumber(h)+(m>59 and 1 or 0) return f:format(h%24,m%60) end)("%02.0f:%02.0f", io.stdin:read("*l"):match("(%d+):(%d+)")))