This question already has an answer here:
- Paying the Troll toll 9 answers
You are on your way to your friend's house. You decide to carry 2 apples to your friend. To get to their house, you must pass across 8 gates. At each gate, the keeper will take half the amount of apples you have and return one apple back. The question is, how many apples should you carry at the beginning?