You have two numbers, A and B. You need to find out how many different numbers, x, can be arranged with A and B to form a sequence where the difference between the first and second number is the same as the difference between the second and third number.
Input: 5, 7
Output: 3
Input: 6, 1
Output: 2