$\displaystyle x+\sqrt{x+\frac{1}{2}+\sqrt{x+\frac{1}{4}}}=x+\sqrt{\left( \sqrt{x+\frac{1}{4}}+\frac{1}{2} \right)^{2}}=x+\sqrt{x+\frac{1}{4}}+\frac{1}{2}=1024\Rightarrow
\left( \sqrt{x+\frac{1}{4}}+\frac{1}{2} \right)^{2}=32^{2}
\Longrightarrow x=992$