D. Burt (Easy Version)
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

This is the easy version of the problem. The only difference is that in this version, $$$n, w, b \leq 10^6$$$.

As you may know a standard piano has $$$88$$$ keys ($$$52$$$ white and $$$36$$$ black keys). Burt is quirky and wants to build a piano with $$$n$$$ keys, where the number of white keys is a multiple of $$$w$$$ and the number of black keys is a multiple of $$$b$$$.

Help Burt count the number of valid configurations of black/white keys for his custom piano given the constraints:

  1. The total number of keys is $$$n$$$,
  2. The number of white keys is a multiple of $$$w$$$,
  3. The number of black keys is a multiple of $$$b$$$,
  4. The number of white keys is between $$$0$$$ and $$$n$$$ inclusive, and similarly for the number of black keys.
Input

The input contains three space-separated integers $$$n, w, b$$$ ($$$0 \leq n, w, b \leq 10^6$$$) — the total number of keys, the required divisor for the number of white keys, and the required divisor for the number of black keys, respectively.

Output

Please output one integer, the total number of different ways Burt can configure his piano.

Examples
Input
156 24 60
Output
1
Input
72 9 15
Output
2
Input
81 3 3
Output
28
Input
10 2 1
Output
6
Note

Explanation for first two sample cases:

First sample case: The only valid piano with $$$156$$$ keys satisfying the constraints is one with $$$96$$$ white keys (multiple of $$$24$$$) and $$$60$$$ black keys (multiple of $$$60$$$).

Second sample case: the possible valid $$$72$$$-key pianos are:

  1. $$$72$$$ white keys (multiple of $$$9$$$) and $$$0$$$ black keys (multiple of $$$15$$$)
  2. $$$27$$$ white keys (multiple of $$$9$$$) and $$$45$$$ black keys (multiple of $$$15$$$)