Subtraction function with the Cost element selected