An integer $n>0$ is written in decimal system as $\overline{a_ma_{m-1}\ldots a_1}$. Find all $n$ such that
\[n=(a_m+1)(a_{m-1}+1)\cdots (a_1+1)\]
To solve the problem, we need to find all positive integers \( n \) such that the decimal representation of \( n \), denoted as \(\overline{a_m a_{m-1} \ldots a_1}\), satisfies the equation:
\[ n = (a_m + 1)(a_{m-1} + 1) \cdots (a_1 + 1) \]

1. **Express \( n \) in terms of its digits:**
   \[
   n = \sum_{i=1}^{m} 10^{i-1} a_i
   \]
   where \( a_i \) are the digits of \( n \).

2. **Set up the given equation:**
   \[
   \sum_{i=1}^{m} 10^{i-1} a_i = \prod_{i=1}^{m} (a_i + 1)
   \]

3. **Rearrange the equation:**
   \[
   \sum_{i=2}^{m} (10^{i-1} - \prod_{j=1}^{i-1} (a_j + 1)) a_i = 1
   \]
   This equation implies that all summands are nonnegative, and one of them must be 1 while the others are 0.

4. **Consider the case \( m = 2 \):**
   \[
   n = 10a_2 + a_1
   \]
   \[
   n = (a_2 + 1)(a_1 + 1)
   \]
   We need to find \( a_1 \) and \( a_2 \) such that:
   \[
   10a_2 + a_1 = (a_2 + 1)(a_1 + 1)
   \]
   Expanding and simplifying:
   \[
   10a_2 + a_1 = a_2 a_1 + a_2 + a_1 + 1
   \]
   \[
   10a_2 = a_2 a_1 + a_2 + 1
   \]
   \[
   9a_2 = a_2 a_1 + 1
   \]
   \[
   9a_2 - 1 = a_2 a_1
   \]
   \[
   a_1 = \frac{9a_2 - 1}{a_2}
   \]
   For \( a_1 \) to be an integer, \( 9a_2 - 1 \) must be divisible by \( a_2 \). Testing values of \( a_2 \) from 1 to 9, we find:
   \[
   a_2 = 2 \implies a_1 = \frac{9 \cdot 2 - 1}{2} = \frac{18 - 1}{2} = \frac{17}{2} \quad \text{(not an integer)}
   \]
   \[
   a_2 = 1 \implies a_1 = \frac{9 \cdot 1 - 1}{1} = 8
   \]
   Thus, \( n = 10 \cdot 1 + 8 = 18 \).

5. **Consider the case \( m \geq 3 \):**
   If \( m \geq 3 \), then:
   \[
   \prod_{j=1}^{m-1} (a_j + 1) = 10^{m-1}
   \]
   This implies:
   \[
   a_1 = a_2 = \cdots = a_{m-1} = 9
   \]
   However, this is impossible because the product of digits \( a_i + 1 \) would be too large to match the sum of the digits multiplied by powers of 10.

Therefore, the only solution is when \( m = 2 \) and \( n = 18 \).

The final answer is \( \boxed{18} \).