A store offers an assortment of toys of various types. For each type, the number of toys and the price of one toy are known. Determine the total number of toys with a price less than hryvnias.
The first line contains an integer n~(0 \le n \le 1000) — the number of toy types in the price list. Each of the following lines contains two integers:
a~(0 \le a \le 1000) — the number of toys of this type, and
b~(0 < b \le 10000) — the price of one toy of this type, in hryvnias.
Print the total number of toys with a price less than hryvnias.
Example 1