Problem Description

Make a Counter class with inc() and dec(). Process q commands INC or DEC and print final value.

Input Format

First line q. Next q lines.

Output Format

One integer final.

Sample Test Case

Input:
5 INC INC DEC INC DEC
Output:
1

Constraints

q

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next