Let $x_1=1$ and $x_{n+1} =x_n+\left\lfloor \frac{x_n}{n}\right\rfloor +2$, for $n=1,2,3,\ldots $ where $x$ denotes the largest integer not greater than $x$. Determine $x_{1997}$.

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