Simple calculator using binary tree