ConsCell current = input;
do {
if (current.getCarType() != ConsType.CONS_CELL)
continue;
//We can drop the parentheses if the interior has a length of 1 after the recursive call
current.replaceCar(removeExcessParentheses((ConsCell) current.getCar()));
if (current.getCarType() != ConsType.CONS_CELL)
continue;
/* We can also drop the parentheses in the following cases:
* Left: + on any f(x), -,* on one term, ^,/,% on length == 1, not operator on length == 1
* Right: +,- on any f(x), *,/ on one term, ^,% on length == 1, not operator on length == 1