How much long term gain can be applied to accrued long term losses?