def METHOD_NAME(x):
    if len(x) == 0:
        return 0
    x = copy.copy(x)
    x = sorted(x)
    idx = int(len(x)/2)
    if len(x) % 2 == 0:
        return (x[idx - 1] + x[idx]) / 2
    else:
        return x[idx]