program n1;
uses crt;
var a:array[1..3,1..3] of integer;
b:array[1..1000] of integer;
i,j,S,l:integer; k:real;
begin
clrscr;
S:=0;
l:=0;
for i:=1 to 3 do
for j:=1 to 3 do
read(a[i,j]);
for i:=1 to 3 do
for j:=1 to 3 do
if a[i,j]>0 then begin
inc(l);
S:=S+a[i,j];
end;
k:=s/l;
writeln(k);
end.