An $m\times n(m,n\in \mathbb{N}^*)$ rectangle is divided into some smaller squares. The sides of each square are all parallel to the corresponding sides of the rectangle, and the length of each side is integer. Determine the minimum of the sum of the sides of these squares.
1. **Understanding the Problem**: We need to divide an \(m \times n\) rectangle into smaller squares such that the sides of each square are parallel to the sides of the rectangle, and the length of each side is an integer. We aim to find the minimum sum of the sides of these squares.

2. **Using Euclid's Algorithm**: The key insight is to use Euclid's algorithm to iteratively cut the largest possible square from the rectangle until the entire rectangle is divided into squares. This process is optimal and minimizes the sum of the sides of the squares.

3. **Algorithm Explanation**:
   - Start with an \(m \times n\) rectangle.
   - Without loss of generality, assume \(m \geq n\).
   - Cut out an \(n \times n\) square from the rectangle. This leaves a \((m-n) \times n\) rectangle.
   - Repeat the process with the remaining rectangle until the entire area is covered by squares.

4. **Sum of Sides Calculation**:
   - Each time we cut out a square, we add the side length of the square to our sum.
   - The process continues until the dimensions of the remaining rectangle are both equal to the greatest common divisor (gcd) of \(m\) and \(n\).

5. **Final Sum of Sides**:
   - The sum of the sides of the squares is given by \(m + n - \gcd(m, n)\).
   - This is because the total number of cuts made is \(\frac{m}{\gcd(m, n)} + \frac{n}{\gcd(m, n)} - 1\), and each cut adds the side length of the square to the sum.

6. **Proof of Optimality**:
   - Suppose no square contains two corners of the rectangle. We claim that the sum of the sides is already \(m + n\).
   - Consider every square adjacent to the boundary of the original rectangle. We count one side for every such square.
   - We can count either all the sides adjacent to the left side of the rectangle or all sides adjacent to the right side of the rectangle. Then, we count all the sides adjacent to the bottom and all the sides adjacent to the top, except for some two corner squares.
   - This counting ensures that we have at least \(m + n\) as the sum of the sides.

7. **Conclusion**:
   - The minimum sum of the sides of the squares is \(m + n - \gcd(m, n)\).

The final answer is \(\boxed{m + n - \gcd(m, n)}\).