Little Igor did not practice mathematics at all over the summer holidays, so a few days before school started, he realized he no longer remembered basic mathematical operations. Now he is pestering his brother Davor to help him practice.
To make the practice interesting, Davor told Igor to think of an integer. Then, he told him several times to add, subtract, multiply, or divide the thought-of number by another integer. When performing division, Igor always uses integer division (for example, dividing $-27$ by $10$ results in $-2$). At the end of the practice, Igor says the final result out loud, and it is up to Davor to guess which number Igor thought of at the beginning.
Write a program that, based on the given operations and the final result, determines how many different numbers Igor could have thought of.
Input
The first line contains a natural number $N$ ($1 \le N \le 10$), the number of operations.
Each of the following $N$ lines contains one operation in one of the four forms: "DODAJ x", "ODUZMI x", "POMNOZI SA x", "PODIJELI SA x", where $x$ is an integer, $1 \le x \le 9$.
The last line contains the final result, an integer $R$ ($-100 \le R \le 100$).
Output
Print the number of different integers Igor could have thought of in the first and only line.
Examples
Input 1
1 POMNOZI SA 5 8
Output 1
0
Note 1
There is no integer that, when multiplied by $5$, gives $8$.
Input 2
2 POMNOZI SA 3 PODIJELI SA 2 -1
Output 2
1
Note 2
The only number Igor could have thought of is $-1$.
Input 3
4 DODAJ 5 PODIJELI SA 5 ODUZMI 5 PODIJELI SA 5 1
Output 3
25