Balloon burst problem

A. 2 3 5 , if we burst balloon 3 then sum is 2*5= 10

And array become 2 5

B. if we burst balloon 2 then sum is 5 + 10 = 15

And array becomes 5

C. not we burst last balloon 5 then it return it's balloon

And sum is now 15 + 5 =20

How to solve using dynamic programming.

I am weak in DP . Please help me out