you give n number a_1 a_2 dot a_n with cost coin perform follow operationchoose number add subtract 1 itin particular apply operation number timesWe want product number equal 1 word want a_1 cdot a_2 dot cdot a_n 1 for example n 3 number 1 3 0 product equal 1 3 coin add 1 second element add 1 second element subtract 1 element array 1 1 1 and 1cdot 1 cdot 1 1what minimum cost pay