A General Input Distance Function Based on Opportunity Costs. (18th January 2012)