Remove division operation and prevent negative numbers