I repost the problem because I think the answers did not fully solve the problem.
Let $X_1,\ldots,X_{n}$ be independent exponential variables with mean 1, and let $S_k = X_1+\cdots+ X_k$, it is not hard to get $\mathbb{E}(S_k)=k$.
Let random variable $Y_k=|S_k-k|$,
My first question is: what is the probability of $Y>t$ for some $t>0$, in another word: $\Pr(Y>t)$?
Define another random variable $Z=\max_{k=1}^n Y_k$
The question is: how to calculate $\mathbb {E} (Z)$.

