Find the sum of all the real values of x satisfying $(x+\frac{1}{x}-17)^2$ $= x + \frac{1}{x} + 17.$
1. Let \( x + \frac{1}{x} = y \). The given equation becomes:
   \[
   (y - 17)^2 = y + 17
   \]

2. Expand and simplify the equation:
   \[
   (y - 17)^2 = y + 17 \implies y^2 - 34y + 289 = y + 17
   \]
   \[
   y^2 - 34y + 289 - y - 17 = 0
   \]
   \[
   y^2 - 35y + 272 = 0
   \]

3. Solve the quadratic equation \( y^2 - 35y + 272 = 0 \) using the quadratic formula \( y = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \):
   \[
   y = \frac{35 \pm \sqrt{35^2 - 4 \cdot 1 \cdot 272}}{2 \cdot 1}
   \]
   \[
   y = \frac{35 \pm \sqrt{1225 - 1088}}{2}
   \]
   \[
   y = \frac{35 \pm \sqrt{137}}{2}
   \]

4. The solutions for \( y \) are:
   \[
   y_1 = \frac{35 + \sqrt{137}}{2}, \quad y_2 = \frac{35 - \sqrt{137}}{2}
   \]

5. The sum of all values of \( y \) is:
   \[
   y_1 + y_2 = \frac{35 + \sqrt{137}}{2} + \frac{35 - \sqrt{137}}{2} = \frac{35 + 35}{2} = 35
   \]

6. Since \( x + \frac{1}{x} = y \), the sum of all values of \( x \) is the same as the sum of all values of \( y \).

The final answer is \(\boxed{35}\).