input: from typing import List
  from functools import reduce
  import math
  
  def reduce_array_size(nums: List[int]) -> int:
      """
      Given an array called nums that's indexed starting at zero and consists of positive numbers, your goal is to reduce the size of nums by repeating the following steps multiple times (including not performing it at all):
  
      Pick two different indices i and j within nums, ensuring that nums[i] and nums[j] are both greater than zero.
  
      Append the result of nums[i] % nums[j] to the end of nums.
  
      Remove the elements located at indices i and j from nums.
  
      Return an integer representing the smallest possible length of nums after conducting the operation any number of times.
  
      Examples:
      >>> nums = [1,4,3,1]
      1
      >>> nums = [5,5,5,10,5]
      2
      >>> nums = [2,3,4]
      1
  
      Constraints:
      1 <= len(nums) <= 10^5
      1 <= nums[i] <= 10^9
      """
output:     
      while len(nums) > 1:
          nums.sort()
          if nums[-1] % nums[-2] == 0:
              nums.pop(-1)
          else:
              nums.append(nums[-1] % nums[-2])
              nums.pop(-2)
              nums.pop(-1)
      return len(nums)
  