Competitions
2023 Azerbaijan, Semifinals, February 18, 10 - 11 classes
Remainders
After Fuad got acquainted with the remainder operator, he thought about the next mathematical problem. He wonders how to compute ((n mod 1) + (n mod 2) + ... + (n mod m) ) .
Here mod represents the remainder operator and (x mod y) represents the remainder obtained when x is divided by y. For example (8 mod 3) = 2.
Find the value of the above expression for the given positive integers n and m.
Input
Two integers n and m (1 ≤ n, m ≤ 2 * 109
).
Output
Print the value of the given expression.