print((function (h0, m0, d, d0) local t=(h0+d-d0)*60+m0 local h,m=math.floor(t/60)%24,t%60 if m>59 then h,m=h+1,0 end if h==24 then h=0 end return string.format("%02.0f:%02.0f",h,m) end)(io.stdin:read("*n"), io.stdin:read("*n"), tonumber(io.stdin:read("*l"):sub(5)), 9))