In a chemical reaction, the law of conservation of mass states that the total mass of the reactants must equal the total mass of the products.
In this reaction:
\[ \text{CaCO}_3 \rightarrow \text{CO}_2 + \text{CaO} \]
If the scientist starts with 30 grams of calcium carbonate (CaCO3), then the total mass of the products (CO2 and CaO) must also be 30 grams.
Therefore, the answer is:
30 grams.