input: def max_height_of_triangle(red: int, blue: int) -> int:
      """
      You are given two integers red and blue representing the count of red and blue colored balls. You have to arrange these balls to form a triangle such that the 1st row will have 1 ball, the 2nd row will have 2 balls, the 3rd row will have 3 balls, and so on.
  
      All the balls in a particular row should be the same color, and adjacent rows should have different colors.
  
      Return the maximum height of the triangle that can be achieved.
  
      Examples:
      >>> red = 2, blue = 4
      3
      >>> red = 2, blue = 1
      2
  
      Constraints:
      1 <= red, blue <= 100
      """
  
output:     total_balls = red + blue
      height = 0
      while total_balls >= height + 1:
          height += 1
          total_balls -= height
      return height