Let $X\_1, X\_2,\dotsc$ be independent and identically distributed with mean $E[X]$ and variance $VAR[X]$. Let $N$ be a non-negative integer-valued random variable independent of the $X\_i$'s. Show
$$
VAR\left[ \sum\_{i=1}^N X\_i \right] = E[N]VAR[X]+(E[X])^2VAR[N]
$$
I've tried expanding this in a number of different ways but I can't quite seem to get it to work out. I don't really understand how to condition on a random variable like this. Any help would be greatly appreciated.