Sum of Imperfections

Add up, for every integer from A to B, the absolute gap between the number and the sum of its proper divisors.

Medium4Number theoryPrefix sumNo attempts yetTime limit3sMemory limit128 MB

Problem

A number is perfect when it equals the sum of its divisors that are smaller than itself. For example, 28=1+2+4+7+1428 = 1 + 2 + 4 + 7 + 14, so 28 is perfect.

Starting from that definition, the imperfection of a natural number NN, written f(N)f(N), is the absolute difference between NN and the sum of the divisors of NN that are smaller than NN. A perfect number has imperfection 0, and every other natural number has a positive imperfection. For example:

  • f(6)=6123=0f(6) = |6 - 1 - 2 - 3| = 0
  • f(11)=111=10f(11) = |11 - 1| = 10
  • f(24)=2412346812=12=12f(24) = |24 - 1 - 2 - 3 - 4 - 6 - 8 - 12| = |-12| = 12

Given positive integers AA and BB, write a program that computes the sum of the imperfections of all numbers from AA to BB, that is f(A)+f(A+1)++f(B)f(A) + f(A + 1) + \cdots + f(B).

Input

The first line contains the positive integers AA and BB, separated by a space. (1AB1071 \le A \le B \le 10^7)

Output

Print the required sum on the first and only line.

Hint

The sum can exceed the range of a 32 bit integer.