Calculator implementation based on Reverce Polish Notation