# Number of toys

Execution time limit is 1 second

Runtime memory usage limit is 128 megabytes

You are given the number of types of toys in the shop, along with the quantity and cost of each type. Find the total number of toys that cost less than $50$ grn.

## Input

The first line contains the number of types of toys $n(0≤n≤1000)$. Each of the next $n$ lines contains two numbers: the count of toys $a(0≤a≤1000)$ of the next type and the price $b(0<b≤10000)$ of each toy in grn.

## Output

Print the total number of toys that cost less than $50$ grn.

## Examples

Input #1

Answer #1

Submissions 27K

Acceptance rate 49%