input: from typing import List
  
  def adjust_median_to_target(nums: List[int], target: int) -> int:
      """
      Given an integer array nums and a non-negative integer target, you can modify any element by increasing or decreasing it by 1 per operation.
  
      Return the fewest operations required to adjust the median of nums to equal target.
  
      The median is the central value of the array when sorted in non-decreasing order. If there are two possible medians, choose the larger.
  
      Examples:
      >>> nums = [2,5,6,8,5], target = 4
      2
      >>> nums = [2,5,6,8,5], target = 7
      3
      >>> nums = [1,2,3,4,5,6], target = 4
      0
  
      Constraints:
      1 <= nums.length <= 2 * 10^5
      1 <= nums[i] <= 10^9
      1 <= target <= 10^9
      """
output:     
      nums.sort()
      n = len(nums)
      if n % 2 == 1:
          median_idx = n // 2
      else:
          median_idx = n // 2
      median = nums[median_idx]
      return abs(median - target)
  