Calculator for prefix syntax notation