Determining the moment of inertia