I know the answer. But is there any general FORMULA for it? If yes, please provide the complete derivation of it.
In the solution, they used $\rightarrow 2^{h-1}+1.$ I tried but I am not able to derive it.