A body weighs 6 grams when placed on one pan and 24 grams when placed on the other pan of a defective beam balance according to the reading shown on the instrument. If the beam is horizontal when both pans are empty, what is the true weight of the body?