var i,n,sum:integer;
begin
readln(n);
while n>0 do begin
i:=i+1;
sum:=sum+(n mod 10);
n:=n div 10;
end;
writeln(sum/i);
end.
var i,n,sum:integer;
begin
readln(n);
while n>0 do begin
i:=i+1;
sum:=sum+(n mod 10);
n:=n div 10;
end;
writeln(sum/i);
end.