dividend shall not be treated as applicable earnings and profits of the corporation receiving such dividend to the extent of any portion of the dividend not properly allocable (as determined under section 316, as modified by section 959(c) in the case of such controlled foreign corporation) to applicable earnings and profits of such controlled foreign corporation or such foreign corporation. (6) Exempt earnings and profits (A) In general The term exempt earnings and profits means, with respect to any corporation for any taxable year, its earnings and profits for the taxable year and its earnings and profits accumulated in prior taxable years beginning after December 31, 2018, which are properly allocable to exempt amounts received or accrued by the corporation. (B) Exempt amounts The term exempt amounts means, with respect to any corporation— (i) any dividend to the extent of the deduction allowable to the corporation under section 243, 245, or 245A with respect to the dividend, (ii) any foreign-derived intangible income (as defined in section 250(b)) or global intangible low-taxed income (as defined in section 951A(b)) to the extent of the deduction allowable to the corporation under section 250 with respect to any such income, (iii) any increase in subpart F income by reason of section 965 to the extent of the deduction allowable to the corporation under section 965(c)(1) with respect to any such income, and (iv) any other amount to the extent such amount is exempt from taxation under this title. (7) Proper allocation of dividends to earnings and profits (A) In general The Secretary shall prescribe rules for the proper allocation of dividends to earnings and profits for purposes of applying this subsection. (B) Look through rules For purposes of paragraph (4)(C), such rules shall include rules requiring in appropriate cases the look through to earnings and profits of members of any affiliated group including a controlled foreign corporation or foreign corporation described in such paragraph where the earnings