import java.io.*;
import java.util.*;

public class C2 {
	public static void main(String args[])throws IOException
	{
		Scanner input = new Scanner(System.in);
		
		int n = input.nextInt();
		int v[] = new int[n];
		
		for(int i = 0; i < n; i ++)
			v[i] = input.nextInt();
		
		double max = 0.0;
		
		for(int i = 1; i < n - 1; i ++)
		{
			int an = v[i];
			int je = v[i - 1];
			int q = i;
			
			for(int j = 1; j < n - 1; j ++);
			{
				an += v[q];
				je += v[q - 1];
				
				for(int z = 1; z < n; z ++)
				{
					an += v[z - 1];
					je += v[z];
					
					if(je > an)
					{
						double pt1 = (double)i / n;
						double pt2 = (double)q / n;
						double pt3 = (double)(n - (z - 1)) / n;
						
						if(pt1 * pt2 * pt3 > max) max = pt1 * pt2 * pt3;
					}
				}
				
				q ++;
			}
		}
	
		System.out.println(max);
	}
}
