It is hereby ordered that the judgment so appealed from be and the same hereby is unanimously modified as a matter of discretion in the interest of justice and on the law by amending the order of protection and as modified the judgment is affirmed, and the matter is remitted to Monroe County Court for further proceedings in accordance with the following memorandum: Defendant appeals from a judgment convicting him upon his plea of guilty of robbery in the first degree (Penal Law § 160.15 [4]). We reject defendant‘s contention that the sentence is unduly harsh or severe. Where, as here, defendant “effects a plea bargain and receives the precise sentence that was promised, he should not later be heard to complain that he received what he bargained for” (People v Chambers, 123 AD2d 270, 270 [1986]; seePeople v McCullers, 40 AD2d 796, 797 [1972], affd33 NY2d 806 [1973]; People v Northrup, 23 AD3d 1102 [2005], lv denied6 NY3d 757 [2005]). We agree with defendant, however, that County Court erred in setting the expiration date of the order of protection without taking into account the jail-time credit to which he is entitled (seePeople v Hare, 27 AD3d 1171, 1172 [2006], lv denied6 NY3d 894 [2006]; People v Newman, 21 AD3d 1343, 1343-1344 [2005]). Although defendant failed to preserve that contention for our review (seePeople v Nieves, 2 NY3d 310, 315-317 [2004]), we exercise our power to review it as a matter of discretion in the interest of justice (seeCPL 470.15 [6] [a]). We therefore modify the judgment by amending the order of protection, and we remit the matter to County Court to determine the jail-time credit to which defendant is entitled and to specify in the order of protection an expiration date that is three years from the date of expiration of the maximum term of the sentence (seePeople v Grice, 300 AD2d 1005, 1006 [2002], lv denied99 NY2d 654 [2003]). Present—Scudder, P.J., Gorski, Centra, Green and Pine, JJ.