You and your two friends are working in a multinational company. How can you three find out the average salary of you all without disclosing your own salary to the other two?
A and B have a certain number of chocolates with them. If B gives one chocolate to A, they will have an equal number of chocolates. But if A gives one chocolate to B, then A will be left with half the number of chocolates that B has.
Can you find out the number of chocolates they have right now?