Uses system;
var time:DateTime;
s,h,m,k:real;
begin;
readln(h);
readln(m);
readln(s);
time:=time.AddSeconds(s);
time:=time.AddMinutes(m);
time:=time.AddHours(h);
readln(k);
time:=time.AddSeconds(k);
writeln(time.Hour,':',time.Minute,':',time.Second);
end.