Var
a:array[1..50] of integer;
i,n,t,tbc:integer;
Begin
write('nhap vao so hoc sinh trong lop:');readln(n);
t:=0;
For i:=1 to n do
begin
readln(a[i]);
t:=t+a[i];
end;
tbc:=t div n;t:=0;
For i:=1 to n do
if a[i]>tbc then t:=t+a[i];
write('tong can nang cac ban vuot qua trung binh la:',t);
readln
END.