CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #912 #914 →

#913. Postfix expression

You get a postfix (reverse Polish) expression separated by spaces (`+`, `-`, `*`). Find its value using a stack. Example: `3 4 + 2 *` = 14. ### Input One line. ### Output A number.

Examples

Input
4
Output
4
Input
1
Output
1

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!