Operation "Y"
- And why "Y"?
- So that no one would guess...
From the film "Operation Y"
Under this code name, we, the teachers, organized the initiation of students into LKSchenyata. Exactly one day before the event, we selected the bravest among us, known as group Z, to devise challenges for the new LKSchenyata. I was chosen to lead this group.
We quickly dealt with the simpler tasks, which were created by the Chipmunks. However, we faced difficulties with the problems for the parallel A students. We decided that giving them something conventional would be dull and uninspiring, so we invented something entirely new. Specifically, we created a mathematical operation. And yes, teachers don't know other names at night, so after some discussion, I decided to call it operation "Y".
Operation "Y" is represented in writing as ο (for example, 2 ο 3). We spent a considerable amount of time deciding on the action of this operation. Ultimately, we settled on the following:
where the notation refers to the integer part of the number x (for example, the integer part of the number).
However, giving LKSchenyata a simple example of using our operation seemed too easy. All day, the teachers roamed the computer lab, creating expressions that utilized operation "Y" (for instance, the simplest expression was 2 ο 3 ο (4 ο 5)). Once all the examples were compiled, we urgently needed to calculate their values. We succeeded, and now it's your turn!
Input
The input file contains exactly one line. This line consists of an arithmetic expression that uses only the operation "Y". The operation is denoted by the Latin letter "o" (lowercase "o"). The expression may also include natural numbers not exceeding 100000, and parentheses. All parentheses, numbers, and operation symbols are separated by exactly one space. It is guaranteed that the input file contains a correct expression. The number of operations in the expression does not exceed 200.
Output
Output a single integer - the value of the expression.