Given two integers and . A number is called representable if it can be written as the sum
for some finite (possibly zero) number of terms x_i, where each x_i is equal to either or .
Determine how many distinct numbers in the interval are representable.
Constraints
are integers such that |a| \leq 10000, |b| \leq 10000.
are integers such that |A| \leq 10^{18}, |B| \leq 10^{18}.
A \leq B.
The input consists of a single line containing the integers , , , and .
Output the number of distinct numbers in the interval that are representable as sums of and .
Example 1