#C7365. Evaluate Postfix Expression

    ID: 51228 Type: Default 1000ms 256MiB

Evaluate Postfix Expression

Evaluate Postfix Expression

You are given a mathematical expression written in postfix notation (also known as Reverse Polish Notation, RPN). In postfix notation, every operator comes after its operands. Your task is to evaluate the given expression using integer arithmetic and output the result.

Note: For division, use integer division which discards the fractional part. Specifically, the operation is defined as follows in LaTeX: $$a \div b = \text{floor}(a/b)$$ when used on positive integers.

It is guaranteed that the input is a valid postfix expression composed of non-negative integers and the operators +, -, *, and /, separated by spaces.

inputFormat

The input consists of a single line containing a valid postfix expression. Each token (number or operator) is separated by a space.

outputFormat

Output a single integer which is the result of the evaluated postfix expression.

## sample
3 4 +
7