Var
h0, m0, h1, m1, h2, m2: integer;
begin
readln(h0, m0, h1, m1);
m0 += h0 * 60;
m1 += h1 * 60;
m2 := m0 + m1;
h2 := (m2 div 60) mod 24;
m2 := (m1 + m0) mod 60;
h0 := h2 div 10;
h1 := h2 mod 10;
m0 := m2 div 10;
m1 := m2 mod 10;
write(h0, h1, ':', m0, m1);
end.