If $p$ is an odd prime, exactly half the elements of $\mathbb{U}_p$ are squares. I'm trying to prove the following:

If $p$ is an odd prime, then exactly half the elements of $\mathbb{U}_p$ are squares.

Where $\mathbb{U}_p$ refers to the units of $\mathbb{Z}_p$. It seems somewhat intuitive that no more than half could be squares, but I'm struggling to prove that exactly half are squares. Any ideas/hints?

Hint
$$f:  \mathbb{U}_p \to  \mathbb{U}_p \\
f(x)=x^2$$
is a group homomorphism with $\ker(f)=\{ \pm 1 \}$.
Use the fact that $$ \mathbb{U}_p /\ker(f) \simeq \mbox{Im}(f)$$
