Sanggeun's Idea

No attempts yetTime limit2sMemory limit128 MB

Problem

Sanggeun gave his son the following problem.

Two integers n1n_1 and n2n_2 satisfy 1n1<n21041 \le n_1 < n_2 \le 10^4. Let N\mathbb{N}^* be the set of positive integers and define p:NNp:\mathbb{N}^* \rightarrow \mathbb{N}^* by p(n)=2np(n) = 2^n for every nNn \in \mathbb{N}^*. This function defines the set SS.

S(n1,n2)={p(p(n))+1n1nn2}S(n_1,n_2)=\left\{ p(p(n))+1 \mid n_1 \le n \le n_2 \right\}

The set of pairs built from the elements of SS is defined as well.

T(n1,n2)={(m1,m2)m1,m2S(n1,n2), m1<m2}T(n_1,n_2)=\left\{ (m_1,m_2) \mid m_1,m_2 \in S(n_1,n_2),\ m_1 < m_2 \right\}

Now define the value

R(n1,n2)=(m1,m2)T(n1,n2)gcd(m1,m2)R(n_1,n_2)=\sum_{(m_1,m_2) \in T(n_1,n_2)} \gcd(m_1,m_2)

where gcd(m1,m2)\gcd(m_1,m_2) is the greatest common divisor of m1m_1 and m2m_2.

Given n1n_1 and n2n_2, write a program that computes R(n1,n2)R(n_1,n_2).

Input

The first line contains two integers n1n_1 and n2n_2 separated by a space. (1n1<n21041 \le n_1 < n_2 \le 10^4)

Output

Print the value of R(n1,n2)R(n_1,n_2) on the first line.