Coconuts problem

Question

Hints

Answer