Nayaab finished her math test early (and checked her work multiple times), and now has a lot of time to spare. She knows that she might have gotten some questions wrong, or made some mistakes along the way, so she wants to try to calculate her mark on her test before it has been marked by the teacher. For each question, she is able to estimate the percentage she got correct, but she wants to know the estimated percentage of the entire test.
For example, on a mark question, she may estimate that she got it percent correct.
Can you help her estimate her total mark?
Input Specification
The first line will contain an integer , the number of questions on the test.
The next lines will contain two space-separated integers, , the total number of marks for that question, and , the fraction of the question that Nayaab expects to answer correctly, expressed as a percentage.
Output Specification
Output an integer, the estimated percentage of her test mark, rounded to the nearest integer.
Sample Input
5
8 79
19 100
2 21
5 48
6 97
Sample Output
85
Comments