Problem2028--能被整除的数

2028: 能被整除的数

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

给定一个整数 n 和两个不同的质数 p1,p2。

请你求出 1∼n 中能被 p1 , p2 中的至少一个数整除的整数有多少个。

Input

第一行包含一个整数 n 。

第二行包含 2 个质数。

1≤ n ≤1018,
1≤p1 , p2 ≤109

Output

输出一个整数,表示满足条件的整数的个数。

Sample Input Copy

10
2 3

Sample Output Copy

7

HINT


Source/Category

admin