According to the Law of Conservation of Mass, the mass of the reactants before a chemical reaction must equal the mass of the products after the reaction. Therefore, if the mass of the elements before the chemical reaction is 30 grams, the mass after the reaction will also be 30 grams.
So, the correct answer is 30 grams.