Tom & Jerry

Tom has laid out a trap. Jerry is standing at the nth level of mind control. In order to defeat Tom's trap, he needs to reach mth level. The levels are continuous increasing integers. At each increment of level, nth to (n+1)th level, for example, the energy used is - number of distinct prime factors of n.
Jerry needs your help in order to figure out how much total minimum energy he needs to defeat Tom's trap. The total energy is the sum of energy used at each increment of a level.In the calculation of energy, n and m are inclusive.

The only line of input contains the two integers n and  m, separated by a single space.

1 ≤ n ≤ m ≤ 106
Return integer denoting the energy needed by Jerry to escape Tom's mind control.
Sample Input:
3 7
Sample Output:
Jerry is standing at n=3. As he moves from 3 to 4, energy used is 1. From 4 to 5, energy used is 1. Similarly, as he continues to move towards m=7, the total energy used is 1+1+1+2=5.