- Time limit: 1.00 s
- Memory limit: 512 MB
You are given distinct prime numbers and an integer .
Your task is to calculate how many of the first positive integers are divisible by at least one of the given prime numbers.
Input
The first input line has two integers and .
The second line has prime numbers .
Output
Print one integer: the number integers within the interval that are divisible by at least one of the prime numbers.
Constraints
Example
Input:
20 2 2 5
Output:
12
Explanation: the numbers are .