
    The People of the State of New York, Respondent, v Jackie A. Adams, Appellant.
    [881 NYS2d 751]
   Appeal from ajudgment of the Niagara County Court (Richard C. Kloch, Sr., J.), rendered September 19, 2005. The judgment convicted defendant, upon his plea of guilty, of attempted assault in the first degree.

It is hereby ordered that the judgment so appealed from is unanimously affirmed.

Memorandum: On appeal from a judgment convicting him upon his plea of guilty of attempted assault in the first degree (Penal Law §§ 110.00, 120.10 [1]), defendant contends that County Court erred in denying his motion to vacate the plea on the ground that he was mentally incompetent to enter the plea based on his posttraumatic stress disorder. We reject that contention (see generally People v Dover, 227 AD2d 804 [1996], lv denied 88 NY2d 984 [1996]). Contrary to the further contention of defendant, he knowingly, intelligently and voluntarily waived his right to appeal (see People v Lopez, 6 NY3d 248, 256 [2006]), and that valid waiver encompasses his challenge to the severity of the sentence (see People v Hidalgo, 91 NY2d 733, 737 [1998]; People v Moore, 57 AD3d 1432 [2008], lv denied 12 NY3d 785 [2009]). The challenge by defendant to the court’s alleged error in sentencing him as a second violent felony offender does not survive his waiver of the right to appeal (see People v Hamilton, 49 AD3d 1163 [2008]), inasmuch as defendant is essentially challenging the procedure pursuant to which he was sentenced as such, rather than the legality of the sentence (see generally People v Hicks, 201 AD2d 831 [1994], lv denied 83 NY2d 911 [1994]; People v Rosado, 199 AD2d 833, 834-835 [1993], lv denied 83 NY2d 876 [1994]). “Because the power of the court is not implicated by th[at] challenge[ ], appellate review of [that challenge] is foreclosed by the bargained-for waiver of [the right to] appeal” (Rosado, 199 AD2d at 835). In any event, defendant failed to preserve his challenge for our review (see People v Myers, 52 AD3d 1229 [2008]), and it lacks merit. Defendant was properly afforded notice of the predicate violent felony inasmuch as he received the predicate felony statement before he was sentenced (see People v Swan, 60 AD3d 1395 [2009]), and the court’s determination that defendant was a second violent felony offender is supported by proof beyond a reasonable doubt (see People v Williams, 30 AD3d 980, 983 [2006], lv denied 7 NY3d 852 [2006]). Present—Hurlbutt, J.P., Martoche, Fahey, Garni and Pine, JJ.  