def median(numbers):
    """Return the median of the list of numbers."""
    n = len(numbers)
    copy = numbers[:]
    copy.sort()
    if n & 1:
        return copy[n // 2]
    else:
        return (copy[n // 2 - 1] + copy[n // 2]) / 2
