Discrete Mathematics
# Principle of Inclusion and Exclusion

Martin's class has 40 students who took an examination in History and Mathematics. The teacher announced that 28 of them passed in Mathematics, 29 of them passed in History, and 20 of them passed in both subjects.

How many students failed both subjects?

Find the sum of all natural numbers from 1 through 1000 which are neither divisible by 5 nor by 2.

At the Winter Sochi Olympics Press Conference, there are $200$ foreign journalists. Out of them,

- $175$ people can speak German,
- $150$ people can speak French,
- $180$ people can speak English, and
- $160$ people can speak Japanese.

What is the minimum number of foreigners that can speak all the four languages?