N=80-gets.to_i P=gets.split.map &:to_i f=(0..14).to_a N.times{ 14.downto(0){|m| q=(0..m+1).map{|k| k<1||k>m ?1:P[m<2?0:k<2||k>m-1?1:2]/1e2 } s=0 1.upto(m){|i|i.upto(m){|j| t=f[j-i+1]*q[i-1]*q[j+1] i.upto(j){|k| t*=1-q[k] } s+=t }} f[m]=s } } p f[14]*2