Problem Description

Read n lines, each should be 'name amount'. amount must be integer. Sum valid amounts and count bad lines. Output total and badCount.

Input Format

First line n. Next n lines.

Output Format

One line: total badCount.

Sample Test Case

Input:
5 tea 10 coffee x milk 20 badline sugar -5
Output:
25 2

Constraints

n

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next