# Old Magic! himuhasib Tough Cubs' Contest, Octo... 216/249/487
Limits 500ms, 512 MB

You: Guess an integer number, but don't tell me.

You: Now multiply it by 3.

You: Multiply it by 4.

You: Subtract 4 from it.

You: Divide the number by 12.
Your friend: Wait, how did you know that this number will be divisible by 12?

You: Ha Ha Ha! Magic my friend. Just do it please.

You: What did you get?

You: You guessed 49, right?
Your friend: Wow! You are a great magician!

You: Thanks. It's just some mathematical trick!

After impressing your friend, you are thinking of creating a program to automate some process for yourself. The program should take a series of commands and the final number your friend got as input. You have to print the number your friend guessed. Simple and fun, right?

## Input

In the first line of input, there will be a number N (1 ≤ N ≤ 10) denoting the number of commands. In the next N lines there will be a command in each. The command will be any of the following 4 types:

2. subtract x
3. multiply x
4. divide x

Where x is an integer. After that, in a new line there will be an integer that your friend got after all these operations. You can safely assume that after any operation, the number your friend got will be an integer and will not exceed 64-bit signed integer. You can also safely assume that your friend will always guess an integer initially.

In the input, there will be no command to multiply or divide by 0. And you can assume that all the commands are valid.

## Output

In a single line, print the integer number your friend guessed.

## Sample

InputOutput
5
multiply 3
multiply 4
subtract 4
divide 12
50
49 Implementation uDebug

### Submit 