Given an n \times m grid. Each cell is initially black.
Kozak Vus can perform an operation to choose any row or column and invert all cells in it, i.e., each black cell becomes gold, and each gold cell becomes black.
Given the operations that Kozak Vus will perform, find the number of gold cells after all operations have been executed.
The first line contains a single integer (1 \leq n \leq 5 \cdot 10^6) — the number of rows.
The second line contains a single integer (1 \leq n \cdot m \leq 5 \cdot 10^6) — the number of columns.
Note that the constraint n \cdot m \leq 5 \cdot 10^6 is satisfied.
The third line contains a single integer (1 \leq q \leq 10^6) — the number of operations.
Each of the next lines contains the character «R» (row) or «C» (column), followed by a single integer (1 \leq r \leq n) or (1 \leq c \leq m) depending on the character.
Output the number of gold cells after all operations have been completed.
Example 1
Example 2
( points): n=1, m=1, q \leq 100;
( points): n=1, m \leq 100, q \leq 100;
( points): n \leq 100, m \leq 100, q \leq 100;
( points): no additional constraints.