N. Nord's Cairn
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Deep beneath the frost of Hjaalmarch, the excavation at Ustengrav has unearthed the collapsed remains of ancient Nord burial cairns — stone monuments the old draugr-lords raised over their fallen thanes.

The Nords built every cairn the same way: the topmost layer holds a single stone, and each layer beneath it holds exactly one stone more than the layer above. A pile of stones is called cairn-perfect if its stones can be arranged into such a cairn, using every stone and leaving no layer unfinished. Equivalently, a positive integer is cairn-perfect exactly when it is a triangular number $$$$$$T_k=1+2+\cdots+k=\frac{k(k+1)}{2}$$$$$$ for some integer $$$k\ge 1$$$.

Urag gro-Shub, keeper of the Arcanaeum at the College of Winterhold, has grown impatient with the excavation ledgers. The diggers record only the number of stones in each rubble heap, never its shape, and Urag will authorise no further shipment until he knows how many of the recorded counts could possibly have been complete cairns.

Given two integers $$$L$$$ and $$$R$$$, determine how many integers $$$n$$$ with $$$L \le n \le R$$$ are cairn-perfect.

Input

The single line of input contains two integers $$$L$$$ and $$$R$$$ $$$(1 \le L \lt R \le 10^{12})$$$, the smallest and largest stone-counts recorded in the excavation ledger. Both bounds are inclusive.

Output

Print a single integer: the number of cairn-perfect stone-counts in the ledger's range.

Examples
Input
1 10
Output
4
Input
6 9
Output
1