input: def empty_wells(grid, capacity):
      import math
      """
      You are provided with a rectangular array representing wells, where each row indicates an individual well,
      and each 1 in the row signifies a unit of water.
      Each well is equipped with a bucket to extract water, and all buckets share the same capacity.
      Your goal is to determine how many times the buckets need to be lowered to empty the wells.
  
      Example 1:
          Input: 
              grid : [[0,0,1,0], [0,1,0,0], [1,1,1,1]]
              capacity : 1
          Output: 6
  
      Example 2:
          Input: 
              grid : [[0,0,1,1], [0,0,0,0], [1,1,1,1], [0,1,1,1]]
              capacity : 2
          Output: 5
      
      Example 3:
          Input: 
              grid : [[0,0,0], [0,0,0]]
              capacity : 5
          Output: 0
  
      Constraints:
          * Each well has the same width
          * 1 <= len(grid) <= 100
          * 1 <= len(grid[0]) <= 100
          * grid[i][j] is either 0 or 1
          * 1 <= capacity <= 10
      """
output:     total_water_units = sum(sum(row) for row in grid)
      return math.ceil(total_water_units / capacity)