Problem
Described a recursive function with three parameters F(a, b, c):
F(a, b, c) = 1 if a ≤ 0 or b ≤ 0 or c≤ 0;
F(a, b, c) = F(20, 20, 20) if a > 20 or b > 20 or c > 20;
F(a, b, c) = F(a, b, c-1) + F(a, b-1, c-1) - F(a, b-1, c), if a < b and b < c;
F(a, b, c) = F(a-1, b, c) + F(a-1, b-1, c) + F(a-1, b, c-1 ) - F(a-1, b-1, c-1), in all other cases.
Input
Input contains three integers a, b, c - function parameters F (-104 ≤ a,b,c ≤104).
Output
In response, display the value of the function
F(a, b, c).
Examples
| # |
Input |
Output |
| 1 |
1 1 1 |
2 |
| 2 |
2 2 2 |
4 |
| 3 |
10 4 6 |
523 |
| 4 |
50 50 50 |
1048576 |