Problem Description

Read n tokens. Add only those tokens that are valid integers. Output the sum (0 if none valid).

Input Format

First line n. Second line has n tokens.

Output Format

One integer sum.

Sample Test Case

Input:
7 1 two 3 -4 5x 6 7
Output:
13

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next