Ordered that the judgment is affirmed.
The defendant voluntarily, knowingly, and intelligently waived his right to appeal as part of the plea agreement ( see People v Lopez, 6 NY3d 248; People v Callahan, 80 NY2d 273; People v Moissett, 76 NY2d 909). The defendant's valid waiver encompasses the challenge to the legality of the procedure utilized in sentencing him as a second felony offender ( see People v Callahan, supra). The defendant's valid waiver also encompasses any challenge to the sentence as being excessive ( see People v Lopez, supra).