I'm trying to find the number of multiplications to calculate $x^n$. I have arrived at this:
$$M(n) = \begin{cases} - 1 + M\left(\frac{n}{2}\right) & \text{if $n$ even}\\ - 2 + M\left(\frac{n-1}{2}\right) & \text{if $n$ odd} \end{cases} $$
with initial conditions $M(1) = 0$ and $M(2) = 1$.
so how do I solve this? Thanks for any help!