If on If in Zoho CRM

If on If in Zoho CRM

Hello everyone. I wonder how to do if on if condition. Since I got it formula error all the time, I assume it doesnt support if on if.

Let says I have field, number A and decimal B. I would like to do the following formula field If(A>0, A*5 ,if(B>0, A*B, 0))

Can I do that?