static int getDendrogramSize(int n) {
        if (n < 2) {
            return 0;
        }
        int cn = 2;
        int cs = 50;
        while (cn < n) {
            cn++;
            if (3 <= cn && cn <= 5) {
                cs += 50;
            }
            if (6 <= cn && cn <= 10) {
                cs += 30;
            }
            if (11 <= cn && cn <= 20) {
                cs += 15;
            }
        }
        return cs;
    }