; multiplied by (II) the average carbon intensity for qualified electric facilities or the average carbon intensity for qualified thermal facilities, as applicable, in such first full calendar year; and (ii) for megawatt hours of electricity or million British thermal units of useful thermal energy output, as applicable, produced by the newly constructed low-emission facility exceeding those that are covered by the agreement, the number of emission allowances calculated under subsection (a), (b), or (c), as applicable. (B) Calculation of megawatt hours or million British thermal units covered by agreement For purposes of subparagraph (A), the number of megawatt hours of electricity or million British thermal units of useful thermal energy output, as applicable, produced by a newly constructed low-emission facility that are covered by the agreement described in paragraph (2) shall be equal to— (i) the number of emission allowances sold to the existing facility pursuant to the agreement for the first full calendar year described in subparagraph (A), divided by the difference of— (I) the number of emission allowances surrendered by the newly constructed low-emission facility to the Administrator for such first full calendar year; minus (II) the number of emission allowances distributed to the newly constructed low-emission facility by the Administrator for such first full calendar year; multiplied by (ii) the total number of megawatt hours of electricity or million British thermal units of useful thermal energy output, as applicable, produced by the existing facility in such first full calendar year. (6) Conditions An existing facility or newly constructed low-emission facility may receive emission allowances under this subsection only if— (A) such facility provides the Administrator a copy of— (i) the applicable bilateral agreement; and (ii) any amendment to such bilateral agreement within 30 days of the amendment being made