
23 Cal.Rptr.3d 659 (2005)
125 Cal.App.4th 1453
The PEOPLE, Plaintiff and Respondent,
v.
Kelly THURMAN, Defendant and Appellant.
No. C044448.
Court of Appeal, Third District.
January 26, 2005.
Review Denied May 11, 2005.[**]
*661 Maureen L. Fox, Los Gatos, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Mary Jo Graves, Senior Assistant Attorney General, Stephen G. Herndon, Brian G. Smiley and Michael Dolida, Deputy Attorneys General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]
*660 SCOTLAND, P.J.
After his motion to suppress evidence was denied, defendant Kelly Thurman pled no contest to possession of cocaine and was granted probation pursuant to Proposition 36, on the conditions that he complete a drug treatment program (Pen.Code, § 1210.1) and that he waive his entitlement to any future custody credit for time he spends in a residential drug treatment program (Pen.Code, § 2900.5, subd. (a); further section references are to this code unless otherwise specified). He appeals.
In the published part of this opinion, we reject defendant's contention that the trial court erred when it required him to waive future custody credits. As we will explain, given their ordinary, common sense meaning consistent with the apparent purpose of the statute, the words of section 1210.1, subdivision (a), authorize a trial court to require a defendant, as a condition of probation, to waive entitlement to section 2900.5, subdivision (a), custody credits for time that the defendant spends in a residential drug treatment facility.
In unpublished parts of this opinion, we reject another attack on this condition of probation and find no merit in his claim that the court should have suppressed evidence of the cocaine seized from his person and excluded statements he made to the arresting officer.
Accordingly, we shall affirm the judgment.

DISCUSSION

I[***]

II
At sentencing, the trial court noted that defendant was eligible for drug rehabilitation treatment under Proposition 36. The provisions of Proposition 36 are codified in part in Penal Code section 1210.1, subdivision (a), which states: "[E]xcept as provided in subdivision (b), any person convicted of a nonviolent drug possession offense shall receive probation. As a condition of probation the court shall require participation in and completion of an appropriate drug treatment program. ... A court may not impose incarceration as an additional condition of probation. Aside from the limitations imposed in this subdivision, the trial court is not otherwise limited in the type of probation conditions it may impose. Probation shall be imposed by suspending the imposition of sentence. . . ." (Italics added.)
Accordingly, the court placed defendant on probation on the condition that he enter *662 and successfully complete a drug treatment program as recommended by the probation department. Then, over defendant's objection, the court imposed as another condition of probation that "[i]f a residential treatment program is required you agree to waive all custody credits while in the program." Defendant accepted the terms of probation.
Since defendant objected to the condition requiring him to waive custody credits, his ultimate acceptance of that condition does not preclude him from challenging it on appeal. (People v. Welch (1993) 5 Cal.4th 228, 236-237, 19 Cal.Rptr.2d 520, 851 P.2d 802 ["the law does not force a defendant either to accept probation under conditions he deems intolerable, or to reject probation and accept incarceration in order to seek review of an allegedly invalid condition"].)
Defendant contends that because a grant of probation was mandatory, the trial court could not condition probation on the prospective waiver of defendant's statutory right to custody credits for time spent in a drug rehabilitation facility. (§ 2900.5, subd. (a).)[1]
The People retort this condition of probation is authorized by section 1210.1, subdivision (a), of Proposition 36, which states in part: "Aside from the limitations imposed in this subdivision, the trial court is not otherwise limited in the type of probation conditions it may impose."
We agree with the People. For reasons that follow, we conclude that in a case governed by Proposition 36, a trial court may impose a condition of probation requiring a defendant to waive his or her statutory right to custody credits for time spent in a residential drug treatment facility.

A
Generally, a defendant's eligibility for probation is determined by statutes identifying the types of offenses or offenders not eligible for probation. (People v. Welch, supra, 5 Cal.4th at p. 233, 19 Cal.Rptr.2d 520, 851 P.2d 802 (Welch).) Probation is a privilege, not a right (In re York (1995) 9 Cal.4th 1133, 1150, 40 Cal.Rptr.2d 308, 892 P.2d 804), and "[t]he sentencing court has broad discretion to determine whether an eligible defendant is suitable for probation and, if so, under what conditions." (People v. Carbajal (1995) 10 Cal.4th 1114, 1120, 43 Cal.Rptr.2d 681, 899 P.2d 67 (Carbajal).) Probation "conditions are routinely imposed when the sentencing court determines, in an exercise of its discretion, that a defendant who is statutorily eligible for probation is also suitable to receive it." (Welch, supra, 5 Cal.4th at p. 230, 19 Cal.Rptr.2d 520, 851 P.2d 802.)
Some conditions of probation are mandated by statute, but most arise from the sentencing court's general authority to impose any conditions that foster "the reformation and rehabilitation of the probationer," protect the public and the victim, and ensure that justice is done. (§ 1203.1, subd. (j) ["The court may impose and require ... reasonable conditions, as it may determine are fitting and proper to the end that justice may be done, that amends may be made to society for the breach of *663 the law, for any injury done to any person resulting from that breach, and generally and specifically for the reformation and rehabilitation of the probationer"]; Welch, supra, 5 Cal.4th at p. 233, 19 Cal.Rptr.2d 520, 851 P.2d 802.) However, a probation condition regulating conduct that is not itself criminal must be "`reasonably related to the crime of which the defendant was convicted or to future criminality.'" (Welch, supra, 5 Cal.4th at pp. 233-234, 19 Cal.Rptr.2d 520, 851 P.2d 802; accord, Carbajal, supra, 10 Cal.4th at p. 1121, 43 Cal.Rptr.2d 681, 899 P.2d 67.)
A condition imposed with increasing regularity is the prospective waiver of custody credits under section 2900.5 for time spent in a residential drug or alcohol treatment facility. (E.g., People v. Johnson (2002) 28 Cal.4th 1050, 1055, 123 Cal.Rptr.2d 700, 51 P.3d 913 (Johnson); People v. Torres (1997) 52 Cal.App.4th 771, 780-782, 60 Cal.Rptr.2d 803 (Torres); People v. Salazar (1994) 29 Cal.App.4th 1550, 1553, 35 Cal.Rptr.2d 221 (Salazar); People v. Ambrose (1992) 7 Cal.App.4th 1917, 9 Cal.Rptr.2d 812 (Ambrose).) Pursuant to section 2900.5, a defendant who is sentenced either to county jail or to state prison is entitled to credit against the term of imprisonment for days spent in custody, either before sentencing or after sentencing as a condition of probation, and this includes custodial time in a residential treatment facility. (Johnson, supra, 28 Cal.4th at p. 1053, 123 Cal.Rptr.2d 700, 51 P.3d 913.)
Because defendants may waive statutory provisions intended for their benefit, they may give up their right to section 2900.5 custody credits. (Johnson, supra, 28 Cal.4th at pp. 1055, 1058, 123 Cal.Rptr.2d 700, 51 P.3d 913.) Therefore, "a trial court has discretion to condition a grant or extension of probation upon a defendant's express waiver of past and future custody credits" (Johnson, supra, 28 Cal.4th at p. 1055, 123 Cal.Rptr.2d 700, 51 P.3d 913), as long as the defendant's waiver is "knowing and intelligent" in the sense that it was made with awareness of its consequences. (Ibid.; Salazar, supra, 29 Cal.App.4th at p. 1553, 35 Cal.Rptr.2d 221; Ambrose, supra, 7 Cal.App.4th at p.1922, 9 Cal.Rptr.2d 812.)
A waiver of custody credits when probation is conditioned upon completion of a residential treatment program serves as an "incentive" for the defendant and has the "salutary goal [of] insuring optimum chances of success in a treatment program, while reserving an appropriate sentence if, despite the opportunity received, the treatment program and probation are not completed." (Ambrose, supra, 7 Cal.App.4th at p.1925, 9 Cal.Rptr.2d 812.)
Thus, it has been said that the "best interests of both society and the probationer are met by encouraging the success of treatment programs by conditioning attendance upon such a waiver, giving the probationer an additional incentive and reason to succeed." (Torres, supra, 52 Cal.App.4th at p. 775, 60 Cal.Rptr.2d 803.) As Torres observed, "convicted felons who are permitted to enter residential drug rehabilitation programs in lieu of imprisonment [can] be required to waive custody credits as a condition of probation. They are, after all, receiving a remarkable benefit; at their request, they are receiving treatment for their addiction at state expense and are not being confined in a penal institution." (Id. at p. 778, 60 Cal.Rptr.2d 803, orig. italics.)
Accordingly, rather than having to opt between the extremes of incarceration or probation, which latter course could permit a defendant with a drug problem to "simply substitute[] easier time in a residential drug treatment facility for custody *664 in jail or prison" (Torres, supra, 52 Cal.App.4th at p. 775, 60 Cal.Rptr.2d 803), the trial court may choose a middle course by granting probation with a custody waiver condition, thereby giving the defendant a strong incentive to successfully complete the drug program. (Ibid.; Ambrose, supra, 7 Cal.App.4th at p.1925, 9 Cal.Rptr.2d 812.) If the defendant does not wish to accept the condition, he or she may reject probation. (Torres, supra, 52 Cal.App.4th at p. 781, 60 Cal.Rptr.2d 803.)

B
We recognize that the aforesaid cases upholding prospective waivers of custody credits did not involve crimes governed by Proposition 36, which became effective on July 1, 2001.
Proposition 36, the Substance Abuse and Crime Prevention Act of 2000, overrides the trial court's traditional discretion to sentence nonviolent drug offenders to state prison. (People v. Davis (2003) 104 Cal.App.4th 1443, 1446, 129 Cal.Rptr.2d 48 (Davis).) By its terms, the initiative requires the court to grant probation with a drug treatment condition to any person convicted of a nonviolent drug possession offense, and prohibits incarceration as a condition of probation. (Davis, supra, 104 Cal.App.4th at p. 1446, 129 Cal.Rptr.2d 48; § 1210.1, subd. (a).) In other words, the voters have eliminated the court's traditional discretion in determining whether such offenders are suitable for probation, and have made probation mandatory, not discretionary. (Davis, supra, 104 Cal.App.4th at p. 1448, 129 Cal.Rptr.2d 48; see also People v. Esparza (2003) 107 Cal.App.4th 691, 699, 132 Cal.Rptr.2d 377 (Esparza); In re Mehdizadeh (2003) 105 Cal.App.4th 995, 1000, 130 Cal.Rptr.2d 98; In re Taylor (2003) 105 Cal.App.4th 1394, 1396-1397, 130 Cal.Rptr.2d 554.)
Proposition 36 also limits a trial court's discretion to revoke probation for drug offenders within the act's purview. The court does not retain the general discretion to revoke probation under sections 1203.2 and 1203.3; probationers can have their probation revoked only in accordance with the terms of section 1210.1, subdivision (e)(3). (In re Mehdizadeh, supra, 105 Cal.App.4th at pp. 1004-1006, 130 Cal.Rptr.2d 98; Davis, supra, 104 Cal.App.4th at p. 1448, 129 Cal.Rptr.2d 48; People v. Murillo (2002) 102 Cal.App.4th 1414, 1419-1421, 126 Cal.Rptr.2d 358.)
According to section 3 of the initiative, its "Purpose and Intent" is threefold: "[t]o divert from incarceration into community-based substance abuse treatment programs nonviolent defendants, probationers and parolees charged with simple drug possession or drug use offenses; [¶] ... [t]o halt the wasteful expenditure of hundreds of millions of dollars each year on the incarceration  and reincarceration  of nonviolent drug users who would be better served by community-based treatment; and [¶] ... [t]o enhance public safety by reducing drug-related crime and preserving jails and prison cells for serious and violent offenders. . . ."
Defendant contends that because probation for nonviolent drug offenders is no longer a discretionary decision, it is now a right rather than a privilege. In his view, the trial court does not have the authority to require a waiver of custody credits as a Proposition 36 probation condition because it impermissibly coerces a defendant to choose between two statutory rights, i.e., the right to probation (§ 1210.1) or the right to custody credits (§ 2900.5). Asserting that he should not have to give up one right to obtain another, defendant claims it is nonsensical to interpret the statute as giving the trial *665 court the authority to impose such a condition. This is so, he argues, because if defendant refuses to waive his entitlement to credits, the court cannot incarcerate him without violating the dictates of Proposition 36. We disagree.
Although it removed the trial court's discretion to assess a defendant's suitability for probation, Proposition 36 did not eliminate entirely the court's sentencing discretion. Indeed, section 1210.1, subdivision (a), states that, apart from requiring the provision of drug treatment and prohibiting incarceration in jail as a condition of probation, "the trial court is not otherwise limited in the type of probation conditions it may impose."
This language demonstrates that except as specified in the act, the voters did not intend to narrow the types of probation conditions that may be imposed, or to narrow the court's discretion to impose them. (Cf. Carbajal, supra, 10 Cal.4th at p. 1122, 43 Cal.Rptr.2d 681, 899 P.2d 67.) In other words, although eliminating the court's decision as to whether a defendant is suitable for probation, the voters did not eliminate the court's existing authority and discretion to impose probation conditions. (See § 1203.1.)
Of course, the conditions cannot include incarceration; they must be reasonable; and, if they regulate conduct that is not itself criminal, they must be "`reasonably related to the crime of which the defendant was convicted or to future criminality.'" (Welch, supra, 5 Cal.4th at pp. 233-234, 19 Cal.Rptr.2d 520, 851 P.2d 802; Carbajal, supra, 10 Cal.4th at p. 1121, 43 Cal.Rptr.2d 681, 899 P.2d 67.) However, the condition that a defendant waive his or her custody credits for time spent in a residential treatment program does not violate these limitations. (See Johnson, supra, 28 Cal.4th at p. 1055, 123 Cal.Rptr.2d 700, 51 P.3d 913; Torres, supra, 52 Cal.App.4th at pp. 780-782, 60 Cal.Rptr.2d 803; Salazar, supra, 29 Cal.App.4th at p. 1553, 35 Cal.Rptr.2d 221; Ambrose, supra, 7 Cal.App.4th at p.1923, 9 Cal.Rptr.2d 812.)
In effect, defendant interprets Proposition 36 as granting him an unfettered right to probation on his own terms  permitting him to pick and choose the probation conditions he finds acceptable, secure in the knowledge that the court must grant him probation regardless. We do not interpret Proposition 36 as bestowing this power upon a defendant.
It is a fundamental rule of statutory construction that courts do not construe statutes "in ways leading to absurd consequences or defeating the general purpose and policy behind them." (Davis, supra, 104 Cal.App.4th at p. 1448, 129 Cal.Rptr.2d 48.) Section 1210.1 expressly establishes the court's authority to impose probation conditions. This grant of authority is meaningless if defendants are permitted to reject the conditions imposed by the court and, nevertheless, be entitled to receive probation. "[T]he purpose of the statute is to try to rehabilitate; the court has to be the one to decide what package of probation conditions is most likely to succeed," not the defendant. (People v. Campbell (2004) 119 Cal.App.4th 1279, 1290, 15 Cal.Rptr.3d 188.)
Carried to its logical conclusion, defendant's interpretation of Proposition 36 would mean the court could not impose a consent to search condition because it would require defendant to choose between waiving his Fourth Amendment rights and his right to probation. (People v. Bravo (1987) 43 Cal.3d 600, 609, 238 Cal.Rptr. 282, 738 P.2d 336 [probationer subject to a search condition consents to the waiver of Fourth Amendment rights in exchange for avoiding a term in state prison].) *666 Nor could the court impose a condition that defendant refrain from associating with known drug users, since this would require him to choose between his First Amendment right to freedom of association and a grant of probation. (People v. Lopez (1998) 66 Cal.App.4th 615, 628, 78 Cal.Rptr.2d 66 [a probation condition limiting the right to association is permissible if it is reasonably related to the rehabilitation of the probationer and the protection of the public].)
There is no evidence the voters intended such an absurd limitation of the court's authority to impose probation conditions. Rather, under the express language of the statute, the court must require the defendant to complete a drug treatment program and "may not impose incarceration as an additional condition of probation"; but aside from these limitations, "the trial court is not otherwise limited in the type of probation conditions it may impose." (§ 1210.1, subd. (a), italics added.)
Giving the words of section 1210.1 their ordinary, common sense meaning consistent with the apparent purpose of the statute, we conclude that the condition of probation requiring defendant to waive his entitlement to section 2900.5, subdivision (a), custody credits for time spent in a residential drug treatment facility is valid and appropriate.
In sum, Proposition 36 offers nonviolent drug offenders the "opportunity" to participate in a structured drug treatment program "in lieu of incarceration" (Esparza, supra, 107 Cal.App.4th at p. 696, 132 Cal.Rptr.2d 377), if the defendant submits to reasonable probation limitations imposed by the trial court. It does not eliminate the defendant's right to reject this opportunity and decline probation if he or she finds the terms and conditions to be too onerous or intolerable. (Cf. People v. Kendrick (2004) 122 Cal.App.4th 1305, 1311, 19 Cal.Rptr.3d 436 [Prop. 36 defendant is entitled to enter a plea agreement to be sentenced under the determinate sentencing law rather than § 1210.1]; In re Tyrell J. (1994) 8 Cal.4th 68, 82, 32 Cal.Rptr.2d 33, 876 P.2d 519 [an adult offender has the right to refuse probation if the conditions are perceived as more onerous than the sentence that might be imposed].)
As the People point out, defendant "had the choice of accepting the waiver of custody credits condition and avoiding a prison sentence or rejecting the condition and being incarcerated." Defendant chose to accept probation on the terms dictated by the trial court, and he does not claim that his waiver of custody credits was not knowing and intelligent. Consequently, for the reasons stated above, the trial court did not err in requiring defendant as a condition of probation to waive custody credits for time spent in a residential drug treatment program.

III[]

DISPOSITION
The judgment is affirmed.
We concur: NICHOLSON, J., and ROBIE, J.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of parts I and III.
[**]   Kennard, J., dissented.
[***]   See footnote *, ante.
[1]  Section 2900.5, subdivision (a), provides in pertinent part: "In all felony and misdemeanor convictions, either by plea or by verdict, when the defendant has been in custody, including, but not limited to, any time spent in a ... rehabilitation facility, ... or similar residential institution, all days of custody of the defendant, including days served as a condition of probation in compliance with a court order, ... shall be credited upon his or her term of imprisonment...." (Italics added.)
[]   See footnote *, ante.
