import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main( String[] args ) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner( inputStream );
        PrintWriter out = new PrintWriter( outputStream );
        TaskD solver = new TaskD();
        solver.solve( 1, in, out );
        out.close();
    }

    static class TaskD {
        public void solve( int testNumber, Scanner in, PrintWriter out ) {
            int balls = in.nextInt();

            int comb = balls * ( balls - 1 ) / 2;

            int[] ab = new int[balls];
            for( int i = 0; i < balls; i++ ) {
                ab[i] = in.nextInt();
            }

            int[] ac = new int[comb];
            for( int a = 0; a < balls - 1; a++ ) {
                for( int b = a + 1; b < balls; b++ ) {
                    ac[a + b - 1] = Math.abs( ab[a] - ab[b] );
                }
            }

            int wc = 0;
            for( int i = 0; i < ac.length; i++ ) {
                for( int a = 0; a < ac.length; a++ ) {
                    for( int b = 0; b < ac.length; b++ ) {
                        if( ac[i] > ac[a] + ac[b] ) {
                            wc++;
                        }
                    }
                }
            }
            float ar = ( float ) Math.pow( ac.length, 3 );

            out.println( wc / ar );
        }

    }
}

