(1) In general
Except as provided in paragraph (2), aliens eligible for diversity immigrant visas, subject to the worldwide level specified in section 1151(e) of this title, shall be allocated visas each fiscal year as follows:
(A) Determination of preference immigration
The Attorney General shall determine, based on data available for the most recent previous 5-fiscal-year period, the total number of aliens who are natives of each foreign state and who (i) were admitted or otherwise granted lawful permanent resident status (other than under this subsection), and (ii) were subject to the numerical limitations of section 1151(a) of this title (other than paragraph (3) thereof), or who were admitted or otherwise granted lawful permanent resident status as an immediate relative or other alien described in section 1151(b)(2) of this title.