Aidar, Begimai, and Viktor came to the trial round of the championship.
They saw Scratch in the list of available compilers and remembered how they started learning programming with this language.
For example, during manual testing, it was often unclear what the program was waiting for in terms of input for a particular variable. Therefore, sometimes they would locally add output of the variable name before the input (but would remove it before submitting to the testing system).
The teammates even found several of their submissions on Scratch from those long-ago times in the system.
Now they are curious — how many total characters did they additionally output during local testing compared to the final submission to the system?
The first line contains an integer $$$n$$$ $$$(2 \le n \le 10^5)$$$ — the number of lines in the Scratch program code.
The next $$$n$$$ lines contain one command of the analyzed program.
Commands can be one of the following types:
It is guaranteed that
It is guaranteed that op can only be one of the following symbols:
It is guaranteed that
It is guaranteed that all variables are used in the right side of arithmetic expressions only after their correct initialization.
Output a single integer $$$P$$$ $$$(1 \le P \le 10^9)$$$ — the total number of characters that the teammates output additionally during local testing of this program.
6Ask read_token and waitSet first to answerAsk read_token and waitSet second to answerSet result to first + secondSay result
11
15Ask read_token and waitSet a to answerAsk read_token and waitSet bb to answerSet ccc to a * bbSet dddd to a / bbSet dddd to ccc + ddddSay ddddAsk read_token and waitSet bb to answerAsk read_token and waitSet ccc to answerSet x to bb * ddddSet x to ccc - xSay x
8
First test example
In the program, two input operations are performed:
In total, the teammates output additionally exactly $$$5 + 6 = 11$$$ characters.
Second test example
In the program, four input operations are performed:
In total, the teammates output additionally exactly $$$1 + 2 \cdot 2 + 3 = 8$$$ characters.
| Name |
|---|


