const fi='diem.txt';
fo='kq.txt';
var f1,f2:text;
hs1,hs2,hs3:array[1..100]of integer;
dem1,dem2,dem3,t1,t2,t3,i,sc:integer;
kq:real;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
dem1:=0;
while not eoln(f1) do
begin
inc(dem1);
read(f1,hs1[dem1]);
end;
readln(f1);
dem2:=0;
while not eoln(f1) do
begin
inc(dem2);
read(f1,hs2[dem2]);
end;
readln(f1);
dem3:=0;
while not eoln(f1) do
begin
inc(dem3);
read(f1,hs3[dem3]);
end;
t1:=0;
for i:=1 to dem1 do
t1:=t1+hs1[i];
t2:=0;
for i:=1 to dem2 do
t2:=t2+(2*hs2[i]);
t3:=0;
for i:=1 to dem3 do
t3:=t3+(3*hs3[i]);
sc:=dem1+dem2*2+dem3*3;
kq:=(t1+t2+t3)/sc;
writeln(f2,kq:4:1);
close(f1);
close(f2);
end.