var n,i,j,s,s1,pom:longint;
    pr:double;
    a:array[1..10000] of longint;
    f:text;
begin
 assign(f,'puberaks.in');
 reset(f);
 readln(f,n);
 for i:=1 to n do
   read(f,a[i]);
 close(f);
 for i:=1 to n do
   for j:=i+1 to n do
     if a[i]>a[j] then begin
                        pom:=a[i];
                        a[i]:=a[j];
                        a[j]:=pom;
                       end;
 s:=0;
 s1:=0;
 for i:=1 to n do
   s1:=s1+a[i];
 pr:=0;
 for i:=1 to n-1 do
   begin
    s:=s+a[i];
    s1:=s1-a[i];
    if s1/(n-i)-s/i>pr then pr:=s1/(n-i)-s/i;
   end;
 assign(f,'puberaks.out');
 rewrite(f);
 writeln(f,pr:0:2);
 close(f);
end.



