You are given the number of kinds of the toys in the shop, the number of toys of each kind and cost of a toy of each kind. Find the number of toys with cost less than grn.
The first line contains the number of kinds of the toys . Each of the next lines contains two numbers: the number of toys of the next kind and their price in grn.
Print the number of toys with cost less than grn.