An eccentric mathematician has a ladder with

rungs that he always ascends and descends in the following way: When he ascends, each step he takes covers

rungs of the ladder, and when he descends, each step he takes covers

rungs of the ladder, where

and

are fixed positive integers. By a sequence of ascending and descending steps he can climb from ground level to the top rung of the ladder and come back down to ground level again. Find, with proof, the minimum value of

expressed in terms of

and
%V0
An eccentric mathematician has a ladder with $n$ rungs that he always ascends and descends in the following way: When he ascends, each step he takes covers $a$ rungs of the ladder, and when he descends, each step he takes covers $b$ rungs of the ladder, where $a$ and $b$ are fixed positive integers. By a sequence of ascending and descending steps he can climb from ground level to the top rung of the ladder and come back down to ground level again. Find, with proof, the minimum value of $n,$ expressed in terms of $a$ and $b.$