code: def maxProfit(self, prices: List[int]) -> int:
      maxProfit = 0
  
      for index in range(1, len(prices)):
          if prices[index] > prices[index - 1]:
              maxProfit += prices[index] - prices[index - 1]
  
      return maxProfit
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.maxProfit(prices) and returns: maxProfit