integer N
real,allocatable,dimension(:)::p
real,allocatable,dimension(:,:)::DP
real ans
read*,N
allocate(p(N))
read*,p

allocate(DP(0:N,0:N))
DP=0
DP(0,0)=1
do i=1,N
  DP(i,0)=DP(i-1,0)*(1-p(i))
  do j=1,i
    DP(i,j)=DP(i-1,j-1)*p(i) + DP(i-1,j)*(1-p(i))
  end do
end do
ans=0
do i=N/2+merge(1,0,mod(N,2)==1),N
  ans=ans+DP(N,i)
end do

print"(F11.10)",ans
end