$\ElisaDrinksCider(n):$
$\quad \mathbf{if}\ n = 1\ \mathbf{then}$
$\quad \quad \text{then order Fibonachos}$
$\quad \mathbf{else}$
$\quad \quad \ElisaDrinksCider\left(n \middle/ 2 \right)$
$\quad \quad \mathrm{drink}\ n\ \text{bottles of cider}$
$\quad \quad \ElisaDrinksCider\left(n \middle/ 2 \right)$
Determine the first couple of values of $C(n)$
$C(1) = 0$
$C(2) = 2 + C(1) + C(1) = 2 + 0 + 0 = 2$
$C(4) = 4 + C(2) + C(2) = 4 + 2 + 2 = 8$
$C(8) = 8 + C(4) + C(4) = 8 + 8 + 8 = 24$
Check which formula it’s true for
Profit
Since the last one is the only one that is correct, we have that $C(n) = n \log n$