Implemented calc(String input)