Converting the input into postfix notation before evaluating