Formula for finding density of a cube