#abc051b. [abc051_b]Sum of Three Integers
[abc051_b]Sum of Three Integers
Problem Statement
You are given two integers and .
Three variable and takes integer values satisfying .
How many different assignments of values to and are there such that ?
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the number of the triples of and that satisfy the condition.
Sample Input 1
2 2
Sample Output 1
6
There are six triples of and that satisfy the condition:
Sample Input 2
5 15
Sample Output 2
1
The maximum value of is , achieved by one triple of and .