2. Find the number of all natural numbers in which each subsequent digit is greater than the previous one. (8 points)
Solution. The largest possible number satisfying the condition of the problem is 123456789. Moreover, the number must be at least two digits. All other such numbers can be obtained from 123456789 by erasing one, two, three, four, five, six, or seven digits out of nine. Then the total number

$1+C_{9}^{1}+C_{9}^{2}+C_{9}^{3}+C_{9}^{4}+C_{9}^{5}+C_{9}^{6}+C_{9}^{7}=1+9+(36+84+126) \cdot 2=502$.

Answer. 502 .