4. A trio of friends, Ante, Karlo, and Tomo, were drawing flags of countries they would like to travel to. Ante drew 20, Karlo 25, and Tomo 28 flags. The number of flags drawn by both Karlo and Ante is equal to three-fifths of the number of flags drawn by Ante. The number of flags drawn by both Tomo and Ante is equal to one-fourth of the number of flags drawn by Ante. The number of flags drawn by both Karlo and Tomo is equal to two-sevenths of the number of flags drawn by Tomo. The number of flags drawn by all three is one-seventeenth of the total number of all flags drawn by at least one of them.

How many different flags did Ante, Karlo, and Tomo draw in total?
First method:

$\frac{3}{5}$ of 20 is 12.

Karlo and Ante drew 12 identical flags.

$\frac{1}{4}$ of 20 is 5.

Tomo and Ante drew 5 identical flags.

$$
\frac{2}{7} \text { of } 28 \text { is } 8
$$

Karlo and Tomo drew 8 identical flags.

Let $x$ be the number of flags drawn by all three, and $z$ be the total number of all flags drawn. Then $z=17 \cdot x$ and it holds:

![](https://cdn.mathpix.com/cropped/2024_05_30_ba00de53bdad84e80dffg-04.jpg?height=365&width=508&top_left_y=1271&top_left_x=771)

The number of flags drawn only by Ante is $3+x$.

The number of flags drawn only by Karlo is $5+x$.

The number of flags drawn only by Tomo is $15+x$.

![](https://cdn.mathpix.com/cropped/2024_05_30_ba00de53bdad84e80dffg-04.jpg?height=371&width=523&top_left_y=1873&top_left_x=778)

$17 x=3+x+12-x+5+x+5-x+x+8-x+15+x$

$17 x=48+x$

$16 x=48$

$x=3$

The number of different flags drawn by Ante, Karlo, and Tomo is $z=17 \cdot 3=51$.