Suppose $$X_1, X_2, \ldots$$ are i.i.d. random variables with an exponential distribution with mean $\mu$. Suppose $N$ is independent of $(X_i)_{i = 1}^{\infty}$ and $$\mathbb{P}(N=k) = p(1-p)^k$$ for $k = 0, 1, 2, \ldots$ Let $S_{N} = \sum_{k=1}^{N}X_k$ and $S_N = 0$ whenever $N=0$. Calculate the conditional expectation $\mathbb{E}\left[N \mid S_{N}\right]$.
Any hint would be great, I wouldn't have any problems with calculating $\mathbb{E}\left[S_{N} \mid N \right]$ or if a random vector $(S_N, N)$ had density. I don't have any smart idea how to tackle this problem.