The distance between the points $A$ and $B$ is $\sqrt{34}.$ If $A = (a,4)$ and $B = (-20,33),$ then find the sum of all possible values of $a.$