#abc253d. [abc253_d]FizzBuzz Sum Hard

[abc253_d]FizzBuzz Sum Hard

Problem Statement

Find the sum of integers between 11 and NN (inclusive) that are not multiples of AA or BB.

Constraints

  • 1leqN,A,Bleq1091 \\leq N, A,B \\leq 10^9
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN AA BB

Output

Print the answer.


Sample Input 1

10 3 5

Sample Output 1

22

The integers between 11 and 1010 (inclusive) that are not multiples of 33 or 55 are 1,2,4,71,2,4,7, and 88, whose sum is 1+2+4+7+8=221+2+4+7+8 =22.


Sample Input 2

1000000000 314 159

Sample Output 2

495273003954006262