Under construction

Still being built. Things may change

Either, but Not Both

Interview

Time limit2sMemory limit2048 MB

Summary
Count the integers from 1 to N that are divisible by exactly one of A and B.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Positive integers NN, AA, and BB are given. Here, A≠BA \neq B.

Output the number of integers from 11 to NN (inclusive) that are divisible by exactly one of AA and BB.

Input

The input is given in the following format.

N
A
B

Output

Output the count from the problem, without the unit (個). Output nothing other than the answer. Do not print prompts such as a request for input.

Constraints

  • 1≤N≤1001 \leq N \leq 100.
  • 1≤A≤1001 \leq A \leq 100.
  • 1≤B≤1001 \leq B \leq 100.
  • A≠BA \neq B.
  • All input values are integers.

Examples3

  1. Example 1

    Input
    6
    2
    3
    
    Expected output
    3
    
  2. Example 2

    Input
    1
    5
    3
    
    Expected output
    0
    
  3. Example 3

    Input
    100
    1
    2
    
    Expected output
    50