14.5.35 Let $a$ and $b$ be given positive integers. A robot moves up and down a staircase with $n$ steps. The robot can either ascend $a$ steps or descend $b$ steps at a time. To ensure that the robot can reach the top of the staircase from the ground and then return to the ground after several moves, what is the minimum value of $n$? Prove your conclusion.
Parse the minimum value as $a+b-(a, b)$. Here $(a, b)$ represents the greatest common divisor of $a, b$. Since the robot reaches levels that are multiples of $(a, b)$ each time, we can ignore other levels, treating $(a, b)$ as the first level, and using $\frac{a}{(a, b)}, \frac{b}{(a, b)}$ to replace $a, b$. Therefore, we only need to discuss the case where $(a, b)=1$.
(1) $n=a+b-1$. Since $(a, b)=1, 0, a, 2a, \cdots, (b-1)a$ form a complete residue system modulo $b$. The robot, each time it descends, remains in the same residue class modulo $b$, and each time it ascends, it moves to the next residue class $(i+1)a(\bmod b)$ from $ia(\bmod b)$. Here $ba(\bmod b)$ is 0. If the robot is at level $r$ and $r+a>n$, then $r \geqslant b$. This robot can descend several times until it reaches level $n$, but can only descend $b$ levels. Thus, it is forever confined to this residue class and cannot move to other residue classes (especially it cannot return to the 0 residue class, i.e., it cannot return to the ground).

In summary, when $(a, b)=1$, the minimum value is $n=a+b-1$. In the general case, the minimum value is $n=a+b-(a, b)$.