In the three-dimensional sl(N) Chern-Simons higher-spin theory, we prove thatthe conical surplus and the black hole solution are related by theS-transformation of the modulus of the boundary torus. Then applying themodular group on a given conical surplus solution, we generate a 'SL(2,Z)'family of smooth constant solutions. We then show how these solutions aremapped into one another by coordinate transformations that act non-trivially onthe homology of the boundary torus. After deriving a thermodynamics thatapplies to all the solutions in the 'SL(2,Z)' family, we compute theirentropies and free energies, and determine how the latter transform under themodular transformations. Summing over all the modular images of the conicalsurplus, we write down a (tree-level) modular invariant partition function.