Switch to BigInteger for calculations.