# Wald's equation example controversy

I'm trying to get a grip of Wald's equation, applying it to the following example.

Suppose, we have a simple sequence of fair coin flips, where heads wins us a dollar, while tails means loss of a dollar: $$\mathbb{P}(X_i=1)=\frac{1}{2}, \mathbb{P}(X_i=-1)=\frac{1}{2}$$

Suppose, that we're planning to gamble, tossing the coin until we win 3 dollars, that's our condition on stopping time N:

$$S_N = \sum_{i=1}^{N}X_N = 3$$

According to Wald's equation $$E(S_N) = E(X_i) \cdot E(N)$$

As we know, expectation of our fortune at stopping time is $E(S_N) = 3$, expectation of a fair coin is zero: $E(X_i) = 0$, so I thought that Expectation of the stopping time $E(N)$ should grow to infinity. But seemingly it doesn't.

Our process is described by the following Markov chain:

$$\begin{pmatrix} \mathbb{P}(S_{i+1}=2) \\ \mathbb{P}(S_{i+1}=1) \\ \mathbb{P}(S_{i+1}=0) \\ \mathbb{P}(S_{i+1}=-1) \\ \mathbb{P}(S_{i+1}=-2) \\ \mathbb{P}(S_{i+1}=-3) \\ \dots \end{pmatrix} = \begin{pmatrix} 0 & 0.5 & 0 & 0 & 0 & 0 & \dots\\ 0.5 & 0 & 0.5 & 0 & 0 & 0 & \dots\\ 0 & 0.5 & 0 & 0.5 & 0 & 0 & \dots\\ 0 & 0 & 0.5 & 0 & 0.5 & 0 & \dots\\ 0 & 0 & 0 & 0.5 & 0 & 0.5 & \dots\\ 0 & 0 & 0 & 0 & 0.5 & 0 & \dots\\ 0 & 0 & 0 & 0 & 0 & 0.5 & \dots\\ \dots & \dots & \dots & \dots & \dots & \dots & \dots \end{pmatrix} \cdot \begin{pmatrix} \mathbb{P}(S_i=2) \\ \mathbb{P}(S_i=1) \\ \mathbb{P}(S_i=0) \\ \mathbb{P}(S_i=-1) \\ \mathbb{P}(S_i=-2) \\ \mathbb{P}(S_i=-3) \\ \dots \end{pmatrix}$$