
816 So.2d 720 (2002)
Jose A. GONZALES, Appellant,
v.
STATE of Florida, Appellee.
No. 5D01-1121.
District Court of Appeal of Florida, Fifth District.
May 3, 2002.
*721 James B. Gibson, Public Defender, and Nancy Ryan, Assistant Public Defender, Daytona Beach, for Appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Angela D. McCravy, Assistant Attorney General, Daytona Beach, for Appellee.
SHARP, W., J.
Gonzales brings a belated appeal from a final judgment and sentences rendered August 6, 1998. He was sentenced to three concurrent thirty year prison terms, with fifteen years and 165 days credit for time served, for three crimes: two counts of attempted capital sexual battery,[1] first degree felonies; and one count of committing a lewd act on a child,[2] a second degree felony. Gonzales argues on appeal that the sentence imposed for count five, committing a lewd act on a child, is illegal because it exceeds the statutory maximum, and that the Department of Corrections has failed to effectuate the stated intent of the trial court that he receive the specified credit for prison time served as to the two first degree felonies. We agree the sentence for count five is illegal and should be vacated, but we deny relief as to the issue of credit for time served.
This case has a complicated history. In April of 1990, Gonzales was charged with six counts of capital sexual battery and two counts of committing a lewd act on a child. He pled nolo contendere to one count of committing a lewd act on a child (count five), and to two counts of attempted capital battery. He agreed to an upward departure sentence of 15 years in prison, concurrent for each count, to be followed by 15 years on probation. He was released from prison in March of 1997, but in January of 1998, his probation was revoked.
The defense and the state agreed to three new concurrent sentences of thirty years in prison with fifteen years suspended and each count credited for fifteen years, 93 days for time served, and fifteen years probation to be served during the suspended part of the sentences. In June of 1998, a new affidavit of violation of probation was filed and in August 1998, Gonzales' probation was again revoked. He received the sentences involved in the current appeal.
Gonzales points out on appeal that the maximum sentence under law that can be imposed for a second degree felony is fifteen years.[3] When a defendant is sentenced to a term in prison followed by probation, the combined times must not exceed the statutory maximum. State v. Holmes, 360 So.2d 380 (Fla.1978); Orosco v. State, 710 So.2d 1386 (Fla. 4th DCA 1998); Soria v. State, 584 So.2d 1130 (Fla. 5th DCA 1991). Thus, the sentence Gonzales received was illegal because the combined times were thirty years.
*722 The state argues that this sentence was part of a plea bargain and that Gonzales agreed to it. However, a defendant cannot be bound by an agreement to accept a sentence that exceeds the statutory maximum. See Williams v. State, 500 So.2d 501 (Fla.1986), receded from on other grounds Quarterman v. State, 527 So.2d 1380 (Fla.1988); Hollybrook v. State, 795 So.2d 1012 (Fla. 2d DCA 2001); Sohl v. State, 710 So.2d 676 (Fla. 5th DCA 1998); Cheney v. State, 640 So.2d 103, 105 (Fla. 4th DCA 1994); Dyer v. State, 629 So.2d 285, 286 (Fla. 5th DCA 1993); Stephens v. State, 627 So.2d 543, 544 (Fla. 2d DCA 1993). Even with a defendant's consent, the court is without jurisdiction to impose a sentence beyond the statutory maximum. Collins v. State, 697 So.2d 1305 (Fla. 4th DCA 1997).
If the combination of probation and prison term exceeds the statutory maximum and the maximum has been expended, the balance of the probation being invalid cannot be revoked and the defendant resentenced. Taylor v. State, 702 So.2d 487 (Fla.1997). Similarly, after revocation of probation, the combination of sanctions (prison term and probation) cannot exceed the statutory maximum for the underlying offense. Collins; Meader v. State, 665 So.2d 344 (Fla. 4th DCA 1995).
In this case, Gonzales could only have been sanctioned for a total of fifteen years for count five. He served his fifteen years in prison. Thus the ensuing fifteen-year term on probation was illegal and void. It could not be revoked and his second sentence, amounting to an additional fifteen years on probation, was illegal. It also follows that the third thirty-year sentence received for violation of the second invalid probation is illegal. See Sipp v. State, 604 So.2d 576 (Fla. 5th DCA 1992).
The state also argues that Gonzales is estopped to raise these arguments because he took advantage of his invalid sentence by waiting to challenge it until he violated probation. Stroble v. State, 689 So.2d 1089, 1090 (Fla. 5th DCA 1997); Huff v. State, 672 So.2d 634, 635 (Fla. 1st DCA 1996)(original sentence improper but not reversible because defendant already received the benefits of the improper sentence). Thus he should be deemed to have waived this claim since he enjoyed the benefits of his bargain. See Dupree v. State, 708 So.2d 968 (Fla. 1st DCA 1998).
We conclude Stroble and Huff are not applicable here because Gonzales received no "benefit." He served the full 15 year prison term allotted for a second degree felony. Thus the two probationary terms following his discharge from prison were invalid and of no benefit to him. Nor do we agree with the argument that we should view this as mere harmless error because the thirty-year sentence for count five is concurrent with the two other valid 30-year sentences. Smith v. State, 629 So.2d 281 (Fla. 5th DCA 1993). The calculation of gain time or other complexities unforeseeable in Florida's penal code may be affected by this illegal sentence.
Finally, Gonzales argues that a print out from the Department of Corrections indicates that the Department has not credited him with the fifteen years plus 165 days indicated on the written sentence imposed by the judge in 1998. That may be. However, this belated appeal challenging the validity of sentences imposed is the wrong procedural vehicle with which to raise this claim. Williams v. State, 673 So.2d 873 (Fla. 1st DCA 1996). The proper remedy is for Gonzales to seek relief through the inmate grievance procedure set out in Chapter 33-29 of the Florida Administrative Code. Thereafter, if relief is not obtained, Gonzales may file his *723 petition for mandamus in the trial court, naming the Department of Corrections, to obtain proper credit. Battles v. State, 799 So.2d 1098 (Fla. 2d DCA 2001).
AFFIRMED, in part; Sentence VACATED as to Count Five.
COBB and PALMER, JJ., concur.
NOTES
[1]  § 794.011(2), Fla. Stat. (1989).
[2]  § 800.04, Fla. Stat. (1989).
[3]  § 775.082(3)(c). Fla. Stat.
