The moment of inertia of an object consisting of discrete mass elements is the sum of the product of the elements' masses and the square of their distances from the axis of rotation. For example, if two spheres of mass m and 2m are attached to the ends of a rod of negligible mass, at a distance R from its center, the moment of inertia about an axis passing through its center is equal to thrice mR squared. If the particles making up an object are not discrete but continuous infinitesimal masses, the summation is replaced by an integral over the object. For example, consider the mass M of a rod of length L uniformly distributed along a straight line. To calculate its moment of inertia, divide M into infinitesimally small pieces of mass dm and integrate the resulting quantity. The moment of inertia about an axis fixed at one of its ends is then obtained to be equal to one-third of ML squared.