Given a finite sequence $S=(a_1,a_2,\cdots ,a_n)$ of $n$ real numbers, let $A(S)$ be the sequence  
$\left(\frac{a_1+a_2}{2},\frac{a_2+a_3}{2},\cdots ,\frac{a_{n-1}+a_n}{2}\right)$  
of $n-1$ real numbers. Define $A^1(S)=A(S)$ and, for each integer $m$, $2\le m\le n-1$, define $A^m(S)=A(A^{m-1}(S))$. Suppose $x>0$, and let $S=(1,x,x^2,\cdots ,x^{100})$. If $A^{100}(S)=(1/2^{50})$, then find the value of $x$. The answer is in the form \sqrt{k} - m, please give the value of k + m.

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