buy and sell sock to find the maximum profit.