Problem
You are given positive integers $N$, $A$, $B$. Here, $A \neq B$.
Output the number of integers between $1$ and $N$, inclusive, that are divisible by either $A$ or $B$, but not both.
Constraints
- $1 \le N \le 100$.
- $1 \le A \le 100$.
- $1 \le B \le 100$.
- $A \neq B$.
- All input values are integers.
Input
The input is given in the following format:
N A B
Output
Output the number of integers between $1$ and $N$, inclusive, that are divisible by either $A$ or $B$, but not both, omitting the unit.
Do not output anything other than the answer. (Do not output sentences prompting for input, etc.)
Sample Input and Output
Sample Input 1
6 2 3
Sample Output 1
3
- $1$ is divisible by neither $2$ nor $3$.
- $2$ is divisible by $2$, but not divisible by $3$.
- $3$ is not divisible by $2$, but is divisible by $3$.
- $4$ is divisible by $2$, but not divisible by $3$.
- $5$ is divisible by neither $2$ nor $3$.
- $6$ is divisible by both $2$ and $3$.
Thus, among the integers between $1$ and $6$, inclusive, there are $3$ integers that are divisible by either $2$ or $3$, but not both: $2$, $3$, and $4$. Therefore, output $3$.
Sample Input 2
1 5 3
Sample Output 2
0
- $1$ is divisible by neither $5$ nor $3$.
Thus, among the integers between $1$ and $1$, inclusive, there is not even $1$ integer divisible by either $5$ or $3$, but not both; that is, there are $0$ such integers. Therefore, output $0$.
Sample Input 3
100 1 2
Sample Output 3
50
Among the integers between $1$ and $100$, inclusive, the integers divisible by either $1$ or $2$, but not both, are all the $50$ odd numbers between $1$ and $100$, inclusive. Therefore, output $50$.