; and (iii) is not barred from adjustment of status under this subsection based on the criminal and national security grounds described under paragraph (3), subject to the provisions of such paragraph. (2) Determination of continuous presence (A) Effect of notice to appear Any period of continuous physical presence in the United States of an alien who applies for temporary resident status under this subsection shall not terminate when the alien is served a notice to appear under section 239(a). (B) Treatment of certain breaks in presence or residence (i) In general Except as provided in clauses (ii) and (iii), an alien shall be considered to have failed to maintain continuous physical presence in the United States under this subsection if the alien has departed from the United States for any period exceeding 90 days or for any periods, in the aggregate, exceeding 180 days. (ii) Extensions for extenuating circumstances The Secretary may extend the time period described in clause (i) for an alien who demonstrates that the failure to timely return to the United States was due to extenuating circumstances beyond the alien’s control, including the serious illness of the alien, or death or serious illness of a parent, grandparent, sibling, or child of the alien. (iii) Travel authorized by the Secretary Any period of travel outside of the United States by an alien that was authorized by the Secretary of Homeland Security may not be counted toward any period of departure from the United States under clause (i). (3) Criminal and national security bars (A) Grounds of ineligibility Except as provided in subparagraphs (B) and (C), an alien is ineligible for cancellation of removal and adjustment of status under this subsection if any of the following apply: (i) The alien is inadmissible under paragraph (2) or (3) of section 212(a) of the Immigration and Nationality Act. (ii) Excluding any offense under State law for which an essential element is the alien’s immigration status, and any minor traffic offense, the alien has