Var
max,min,i:integer;
b:real;
a:array[1..9]of integer;
begin
for i:=1 to 9 do
begin
while (a[i]<1) or (a[i]>6) do
begin
write(i,' оценка: ');
readln(a[i]);
end;
if i=1 then
begin
max:=a[1];
min:=a[1];
end;
if a[i]>max then max:=a[i];
if a[i] b:=b+a[i];
end;
b:=(b-min-max)/7;
writeln('Зачетная оценка: ',b);
end.