Sum(numbers: seq[int]): int =
  result = 0
  for num in numbers:
    result += num

# Function to calculate the average of a list
proc calculateAverage(numbers: seq[int]): float =
  result = 0.0
  if len(numbers) > 0:
    result = float(calculateSum(numbers)) / float(len(numbers))

# Function to filter numbers greater than the average
proc filterNumbersAboveAverage(numbers: seq[int], average: float): seq[int] =
  result = @[]
  for num in numbers:
    if num > average:
      result.add(num)

# Main procedur