Task
Hard
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Watson set a simple task for Rybka – to find a sum of integers less than N, which are divisible by A or B, and print this sum modulo 1000000007 (10^9 + 7). Help Rybka to solve this task.
Input
One line contains three integers N, A, and B.
1 ≤ N, A, B < 10^18.
Output
Print requested sum modulo 1000000007.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 5%