8. A family of 4, consisting of a mom, a dad, and two children, has arrived in city $\mathrm{N}$ for 5 days. They plan to make 10 trips on the subway each day. What is the minimum amount they will have to spend on tickets, given the following tariffs in city $\mathrm{N}$?

| Adult ticket for one trip | 40 rubles |
| :--- | :--- |
| Child ticket for one trip | 20 rubles |
| Unlimited daily pass for one person | 350 rubles |
| Unlimited daily pass for a group of up to 5 people | 1500 rubles |
| Unlimited 3-day pass for one person | 900 rubles |
| Unlimited 3-day pass for a group of up to 5 people | 3500 rubles |
Answer: 5200. The family will spend this amount if the parents buy a three-day pass for themselves, and for the remaining two days, they will buy a one-day pass. For this, they will spend ($900 + 350 * 2$) * $2 = 3200$ rubles.

For the children, it is most cost-effective to buy single-trip tickets for all 5 days, spending $2 * 10 * 20 * 5 = 2000$ rubles.

Thus, the total amount will be $3200 + 2000 = 5200$ rubles.