Problem Description

You will receive q commands on variable x: SET v, ADD v, MUL v. Start x=0. After all commands output x.

Input Format

First line q. Next q lines: command value.

Output Format

One integer x.

Sample Test Case

Input:
4 SET 2 ADD 3 MUL 10 ADD -5
Output:
25

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next