

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Scanner;

public class JerryProtest {

	public static void main(String ... arg){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		double prob = 0;
		ArrayList<Integer> balls = new ArrayList();
		for(int i=0;i<n;i++){
			balls.add(s.nextInt());
		}
		Collections.sort(balls);
		if(balls.get(0)+ balls.get(1)>=balls.get(n-1)){
			System.out.println(prob);
		}
		else{
			prob = (double)2/(Math.pow(n, 3));
			System.out.println(prob);
		}
	}
}
