A dog has three trainers:

[list]
[*]The first trainer gives him a treat right away.
[*]The second trainer makes him jump five times, then gives him a treat.
[*]The third trainer makes him jump three times, then gives him no treat.
[/list]
The dog will keep picking trainers with equal probability until he gets a treat. (The dog's memory isn't so good, so he might pick the third trainer repeatedly!) What is the expected number of times the dog will jump before getting a treat?
1. Define \( E \) as the expected number of times the dog jumps before getting a treat.
2. Consider the three scenarios based on the trainer the dog picks:
   - If the dog picks the first trainer, he gets a treat immediately with 0 jumps.
   - If the dog picks the second trainer, he jumps 5 times and then gets a treat.
   - If the dog picks the third trainer, he jumps 3 times and does not get a treat, so he will have to start over.

3. Since the dog picks each trainer with equal probability (i.e., \(\frac{1}{3}\)), we can set up the following equation for \( E \):
   \[
   E = \frac{1}{3} \cdot 0 + \frac{1}{3} \cdot (E + 5) + \frac{1}{3} \cdot (E + 3)
   \]

4. Simplify the equation:
   \[
   E = \frac{1}{3} \cdot 0 + \frac{1}{3} \cdot (E + 5) + \frac{1}{3} \cdot (E + 3)
   \]
   \[
   E = \frac{1}{3} \cdot 0 + \frac{1}{3}E + \frac{5}{3} + \frac{1}{3}E + 1
   \]
   \[
   E = \frac{2}{3}E + \frac{8}{3}
   \]

5. Solve for \( E \):
   \[
   E - \frac{2}{3}E = \frac{8}{3}
   \]
   \[
   \frac{1}{3}E = \frac{8}{3}
   \]
   \[
   E = 8
   \]

The final answer is \(\boxed{8}\).