Sum of Values


Submit solution

Points: 10
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

A product dictionary stores a price for every product. Compute the sum of all stored values.</p>

Input

The first line contains n (1 ≤ n ≤ 500000). The second line contains n space-separated key:value pairs with distinct keys and integer values |v| ≤ 10^9.

Output

Print the sum of all values.

Examples

Input #1
3
apple:10 banana:5 milk:20
Output #1
35

Explanation #1: The required sum is 10 + 5 + 20 = 35.

Input #2
2
loss:-10 gain:10
Output #2
0

Explanation #2: Negative values are allowed, so -10 + 10 = 0.


Comments

There are no comments at the moment.