We affirm the judgment and sentence, but remand for a determination of the amount of credit for time served and gain time to which appellant is entitled. On remand from an invalid departure sentence, appellant must have his credit for all time served and gain time on the original invalid sentence applied against his new jail and probationary sentence. See McCray v. State, 517 So.2d 770 (Fla. 2d DCA 1988); *1248see also State v. Green, 547 So.2d 925 (Fla.1989).
FRANK, A.C.J., and HALL and PATTERSON, JJ., concur.