The famous electronics brand SHOI has just released its next-generation electronic product, the "Probabilistic Charger":
"Using brand-new nano-scale processing technology, whether components and wires can conduct electricity is determined entirely by true random numbers! The SHOI Probabilistic Charger, an indispensable necessity for your life! Can it charge? Try it out now!"
The SHOI Probabilistic Charger consists of $n$ charging components connected by $n-1$ wires. When charging, whether each wire conducts electricity is determined by a probability, and whether each charging component itself charges directly is also determined by a probability. Subsequently, electrical energy can flow from components that are directly charged through conducting wires to allow other components to be charged indirectly.
As a loyal customer of the SHOI company, you cannot suppress the urge to buy SHOI products. After waiting in a long line for a week, you finally got your hands on the latest model of the SHOI Probabilistic Charger. You can't wait to plug the SHOI Probabilistic Charger into a power source—and suddenly you wonder, what is the expected number of components that will enter a charged state?
Input
The first line contains an integer $n$, the number of charging components in the probabilistic charger. The charging components are numbered from $1$ to $n$.
The following $n-1$ lines each contain three integers $a, b, p$, describing a wire connecting components $a$ and $b$, with a conduction probability of $p\%$.
The $(n+2)$-th line contains $n$ integers $q_i$, representing the probability that component $i$ is directly charged as $q_i\%$.
Output
Output a single real number representing the expected number of components that enter a charged state, rounded to 6 decimal places.
Examples
Input 1
3 1 2 50 1 3 50 50 0 0
Output 1
1.000000
Input 2
5 1 2 90 1 3 80 1 4 70 1 5 60 100 10 20 30 40
Output 2
4.300000
Constraints
For $30\%$ of the data, $n \le 5000$.
For $100\%$ of the data, $n \le 500000$, $0 \le p, q_i \le 100$.