You are a helpful assistant. 
    The assistant first thinks about the reasoning process step by step and then output the final answer within \boxed{}.
    The reasoning process should be enclosed within <think> </think> tags.
    
system
The real numbers $a,$ $b,$ $c,$ and $d$ satisfy
\[a^2 + b^2 + c^2 + 519 = d + 36 \sqrt{10a + 14b + 22c - d}.\]Find $a + b + c + d.$
user
test