const n=20;
var a:array[1..n] of integer;
i,b,c:integer; k:real;
Begin
for i:=1 to n do read(a[i]);
b:=0;
c:=0;
for i:=1 to n do begin
if (a[i] mod 3 = 0) then begin
b:=b+a[i];
c:=c+1;
end;
k:=b/c;
writeln(k);
end.
const n=20;
var a:array[1..n] of integer;
i,b,c:integer; k:real;
Begin
for i:=1 to n do read(a[i]);
b:=0;
c:=0;
for i:=1 to n do begin
if (a[i] mod 3 = 0) then begin
b:=b+a[i];
c:=c+1;
end;
end;
k:=b/c;
writeln(k);
end.