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