(B) in subparagraph (U), by inserting and section 530A(e)(4) before the comma at the end. (2) Section 35(g)(3) of such Code is amended— (A) by striking or from and inserting , from , and (B) by inserting or from a Roth HSA (as defined in section 530A(c)) after 223(d)) . (3) Section 220(f)(5)(A) of such Code is amended by inserting or a Roth HSA (as defined in section 530A(c)) after 223(d)) . (4) Section 223(f)(5)(A) of such Code is amended by inserting or a Roth HSA (as defined in section 530A(c)) after paid into a health savings account . (5) Section 408(d)(9) of such Code is amended by adding at the end the following new subparagraph: (F) Application to Roth HSAs Rules similar to the rules of the preceding subparagraphs of this paragraph shall apply with respect to eligible individuals (as defined in section 530A(d)) making contributions to Roth HSAs, except that subparagraph (C) shall be applied by substituting section 530A(b) for section 223(b) . . (6) Section 848(e)(1)(B)(v) of such Code is amended by inserting or a Roth HSA (as defined in section 530A(c)) after 223(d)) . (7) Section 877A(e)(2) of such Code is amended by inserting a Roth HSA (as defined in section 530A(c), after 223), . (8) Section 4973 of such Code is amended— (A) in subsection (a), by striking or at the end of paragraph (5), by inserting or at the end of paragraph (6), and by inserting after paragraph (6) the following new paragraph: (7) a Roth HSA (within the meaning of section 530A), , and (B) by adding at the end the following new subsection: (j) Excess contribution to Roth HSAs For purposes of this section, in the case of Roth HSA (within the meaning of section 530A(c)), the term excess contributions means the sum of— (1) the aggregate amount contributed for the taxable year to the accounts (other than a rollover contribution described in section 220(f)(5), 223(f)(5), or 530A(e)(5)), and (2) the amount determined under this subsection for the preceding taxable year, reduced by the sum of— (A) the distributions out of the accounts