St Andrews Online Judge

Divisible by Both

By Kay Akashi

Time: 1000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

Given integers nn, aa, bb, count the number of ii (1in)(1 \leq i \leq n) such that ii is divisible by both aa and bb.

In the first example, set of ii that satisfy the condition are 1212 and 2424. Hence the answer is 22.

In the second example, there's no ii that satisfies the condition whatsoever. Hence 00.

Constraints

1n1091 \leq n \leq 10^{9}, 1a,b3001 \leq a, b \leq 300.

Subtask 1 (30%)

0n<1050 \leq n \lt 10^{5}.

Subtask 2 (70%)

105n10910^{5} \leq n \leq 10^{9}.

Input

The input contains three integers, nn, aa, and bb.

Output

Output the answer.

Examples

Input

30 3 4

Output

2

Input

10 9 8

Output

0