//package CodeForces.VentureCup2016ELR;

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * Created by ilya on 13.02.16.
 */

public class D626 {
    public static void main(String[] args) {
        sc sc = new sc();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int n = sc.nextInt();
        int [] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }
        Arrays.sort(a);
        double ab = n>2?2:0;
        for (int i = 2; i < n; i++) {
            if (a[i] > a[1]*3 - a[0]*2) break;
            else ab++;
        }
        out.println(((ab-1)/((double)n))*((ab-1)/((double)n))*((ab)/((double)n)));
        out.close();
    }

    public static class sc {
        BufferedReader br;
        StringTokenizer st;

        public sc() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        Integer nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}

