Hello everybody (Long time no see),

is there a formula that allows us to count the multiples of $\displaystyle $n$$ prime numbers up to a number $\displaystyle $S$$.

What i mean:

For example we have three primes $\displaystyle $(2,3,5)$$. How many multiples (of these three numbers) are up to number $\displaystyle $30$$

By sequentian steps we have that:

->There are 15 multiples of 2

->There are 10 multiples of 3. However numbers $6, 12, 18, 24, 30$ have been already counted as multiples of 2. So eventually there are 5 multipes of 3, that are not already counted.

->There are only 2 (new) multiples of 5 (5, 25)

So total we have 15 (multiples of 2) + 5 (new multiples of 3) + 2 (new multiples of 5) = 22

So, is there a quick formula for counting the multiples (once)?

Thanks all for your time and you response