Dima is delving deeper into probability theory. Recently, he acquired non-standard dice. Tests in his home probability lab revealed that each die was asymmetrically weighted in an unknown manner during manufacturing. To confirm this, Dima rolled each die at least times but no more than times daily over several months, meticulously recording the outcomes in his scientific journal. When the calluses from this strenuous task forced him to halt the experiments, he switched to analyzing the results.
He discovered an unexpected fact: each die consistently showed nearly the same number of outcomes for each face each day. He promptly recorded these observations in his journal.
- "I wonder, what is the probability that if I now roll both dice, I get a sum of ?" — this unexpected scientific problem arose for Dima.
Since continuing to write with callused hands is inconvenient, Dima asks you to write a program to answer the above question.
Although the dice are non-standard, their faces are labeled in the usual way.
The first two lines contain the average statistical results of experiments for the occurrence of face number for the first and second die, respectively. All numbers are natural numbers and do not exceed .
The third line contains the sum of interest (2 \leq S \leq 12).
Output the only number: the probability of obtaining the given sum, rounded to decimal places according to standard mathematical rounding rules.
Example 1