David has a collection of 40 rocks, 30 stones, 20 minerals, and 10 gemstones. An operation consists of removing three objects, no two of the same type. What is the maximum number of operations he can possibly perform?

Let's think step by step and output the final answer within \boxed{}.
user