Marie repeatedly flips a fair coin and stops after she gets tails for the second time. What is the expected number of times Marie flips the coin?
1. **Define the problem and the random variable:**
   Let \( X \) be the number of coin flips until Marie gets tails for the second time. We need to find the expected value \( E(X) \).

2. **Break down the problem into smaller parts:**
   Let \( Y \) be the number of coin flips until Marie gets tails for the first time. Since the coin is fair, the probability of getting tails on any flip is \( \frac{1}{2} \). The expected number of flips to get the first tails is:
   \[
   E(Y) = \sum_{k=1}^{\infty} k \cdot P(Y = k)
   \]
   where \( P(Y = k) = \left( \frac{1}{2} \right)^k \).

3. **Calculate the expected value \( E(Y) \):**
   \[
   E(Y) = \sum_{k=1}^{\infty} k \left( \frac{1}{2} \right)^k
   \]
   This is a geometric series. To find the sum, we use the formula for the expected value of a geometric distribution with success probability \( p \):
   \[
   E(Y) = \frac{1}{p} = \frac{1}{\frac{1}{2}} = 2
   \]

4. **Extend the problem to the second tails:**
   Since the coin flips are independent, the process of getting the second tails is identical to the process of getting the first tails. Therefore, the expected number of flips to get the second tails after the first tails is also 2.

5. **Combine the results:**
   The total expected number of flips \( E(X) \) is the sum of the expected number of flips to get the first tails and the expected number of flips to get the second tails:
   \[
   E(X) = E(Y) + E(Y) = 2 + 2 = 4
   \]

Conclusion:
\[
\boxed{4}
\]