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 ~9~ mark question, she may estimate that she got it ~73~ percent correct.
Can you help her estimate her total mark?
The first line will contain an integer ~N~ ~(2 \leq N \leq 500)~, the number of questions on the test.
The next ~N~ lines will contain two space-separated integers, ~M~ ~(1 \leq M \leq 20)~, the total number of marks for that question, and ~P~ ~(0 \leq P \leq 100)~, the fraction of the question that Nayaab expects to answer correctly, expressed as a percentage.
Output an integer, the estimated percentage of her test mark, rounded to the nearest integer.
5 8 79 19 100 2 21 5 48 6 97