function [result]=PV_HW(x1,x2,n)
rvobs=rv_HW(x1,x2,n-x1-x2);
soma=0;
for i=0:n
   for j=0:n-i
      rv=rv_HW(i,j,n-i-j);
      if rv<=rvobs
         f0=rv*2/(n+1)/(n+2);
         soma=soma+f0;
      end
   end
end
result=soma;