Ordered that the judgment is affirmed.
The defendant's waiver of his right to appeal encompassed his right to challenge his sentence as excessive ( see People v. Lococo, 92 NY2d 825, 827; People v. Hidalgo, 91 NY2d 733, 737; People v. Iorio, 276 AD2d 564). Moreover, since the defendant was a second felony offender, the sentence imposed was required to run consecutively to the undischarged sentence on the defendant's prior conviction ( see Penal Law § 70.25 [2-a]; Matter of Madison v. Goord, 274 AD2d 483, 484; People v. Hansen, 267 AD2d 474).