Density of States Partitioning Method for Calculating the Free