Given two non-negative integers and .
A number is called representable if it can be written as a sum x = x_1 + x_2 + \ldots + x_n for some finite (possibly zero) number of terms, where each term x_i is equal to either or . Determine how many distinct numbers in the interval are representable.
Constraints
a, b, A, B are integers. 0 \leq a, b \leq 10\ 000 0 \leq A \leq B \leq 10^7
The input consists of a single line containing , , , .
Output the number of representable numbers using and in the interval .
Example 1