Plasticine balls problem

Question

Hints

Answer