Welcome to ZOJ
 Contests Information Problems Runs Statistics Ranklist Clarification
86 - ZOJ Monthly, January 2010 - G
Simple Sequence

Time Limit: 1 Second      Memory Limit: 32768 KB

Recently, watashi finds a simple sequence S = {si} i >= 1 in a book. This sequence is determined by the following rules:

• For each si, si is a positive integer.
• It's an increasing sequence. For each i >= 1, we have si <= si + 1.
• If x = 2a * b (x > 0, b % 2 != 0), we can find a different j (j1, j2, ..., ja) which satisfy sjk = x (1 <= k <= a). And if for all k, i != jk, then si != x.

So the sequence S = {2, 4, 4, 6, 8, 8, 8, 10, ...}. Now watashi wants to know the sum of si (n <= i <= m). As a kind-hearted person, please help him to find out the answer.

Input

There are multiple test cases (about 80000).

For each case, there's exactly one line which contains two integer n and m (1 <= n <= m <= 10^9) respectively.

Process to the end of the file.

Output

For each case, output the answer in a single line.

Sample Input

1 3
4 4
5 8

Sample Output

10
6
34

Author: MO, Luyi
Source: ZOJ Monthly, January 2010
Submit    Status