There're two integers $A$ and $B$. Only with four operation below:

$A+1$, $A-1$, $\sqrt{A}$, $A^2$

How to count minimum numbers of 'operation' above needed to change $A$ to $B$?