public int getSolutions(BigInteger n) {

        BigInteger[] res;
        BigInteger x;
        BigInteger y;
        int count = 0;


        for (BigInteger i = n.add(ONE); ; i = i.add(ONE)) {

            res = (i.multiply(n)).divideAndRemainder(i.subtract(n));
            x = res[1];
            y = res[0];

            if (y.compareTo(i) == -1) {
                return count;
            }
            if (y.compareTo(i) == 0) {
                count++;
                return count;
            }
            if (x.compareTo(new BigInteger("0")) == 0) {
                count++;
            }
            if (y.compareTo(i) == 0) {
                return count;
            }
            if ((y.subtract(n)).compareTo(ONE) == -1) {
                return count;
            }

        }

    }