An approximation algorithm for the maximum traveling salesman problem