e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

Semiperfect number

Semiperfect number

Perfect number is a number equal to the sum of its divisors (other than the number itself). Semiperfect numbers called integers, which is one greater than or less than the sum of its divisors (eg, 2 or 4).

On the interval from a to b to find the sum of all of semiperfect numbers.

Input:

Two natural numbers а and b (1a, b2 000 000 000).

Output:

The answer to the problem.

Time limit 1 second
Memory limit 64 MiB
Input example #1
2 5
Output example #1
6