What is the sum of all real numbers $x$ for which the median of the numbers $4,6,8,17,$ and $x$ is equal to the mean of those five numbers?

Let's think step by step and output the final answer within \boxed{}.
user