eolymp
bolt
Try our new interface for solving problems
Problems

Number of toys

Number of toys

Time limit 1 second
Memory limit 128 MiB

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 50 grn.

Input data

The first line contains the number of kinds of the toys n~(0 \le n \le 1000). Each of the next n lines contains two numbers: the number of toys a~(0 \le a \le 1000) of the next kind and their price b~(0 < b \le 10000) in grn.

Output data

Print the number of toys with cost less than 50 grn.

Examples

Input example #1
3
2 100.00
5 23.00
10 22.50
Output example #1
15
Source SFE-2010 Variant 27