4. (10 points) Three shepherds are together. A says to B: "If you give me one of your sheep, and then I give you one-fifth of my total sheep, we will have the same number of sheep." A says to C: "If you give me two of your sheep, and then I give you two-sevenths of my total sheep, we will have the same number of sheep." What is the minimum total number of sheep the three shepherds have? $\qquad$
【Analysis】According to what A said to B, first give A one, then take 1/5 to give to B, so A plus 1 is a multiple of 5; similarly, according to what A said to C, it can be concluded that A plus 2 is a multiple of 7; through calculation, A has at least 19, and then deduce the number of B and C to solve the problem.

【Solution】Solution: According to the analysis of the problem, the number of A plus 1 is a multiple of 5, plus 2 is a multiple of 7, so A has at least 19 sheep,
$$
\begin{array}{l}
19+1=20 \text { (sheep), } \\
20 \times \frac{1}{5}=4 \text { (sheep), } \\
20-4=16 \text { (sheep), }
\end{array}
$$

So B has at least $16-4+1=13$ (sheep),
$19+2=21$ (sheep),
$21 \times \frac{2}{7}=6$ (sheep),
$21-6=15$ (sheep),
So C has at least $15-6+2=11$ (sheep),
$$
19+13+11=43 \text { (sheep), }
$$

Answer: The three people have at least 43 sheep in total.
The answer is: 43.