# ---------- Import -----------
import sys
input = sys.stdin.readline

# ---------- Function ----------
def w(a, b, c):
    if a <= 0 or b <= 0 or c <= 0:
        return 1
    
    if a > 20 or b > 20 or c > 20:
        return w(20, 20, 20)
    
    if (a, b, c) in w_dict:
        return w_dict[a, b, c]
    
    if a < b and b < c:
        w_dict[a, b, c] = w(a, b, c-1) + w(a, b-1, c-1) - w(a, b-1, c)
        return w_dict[a, b, c]
    
    w_dict[a, b, c] = w(a-1, b, c) + w(a-1, b-1, c) + w(a-1, b, c-1) - w(a-1, b-1, c-1)
    
    return w_dict[a, b, c]

# ---------- Declaration ----------
w_dict = {}

# ---------- Main ----------
while True:
    A, B, C = map(int, input().split())
    
    if A == -1 and B == -1 and C == -1:
        break
    
    print(f'w({A}, {B}, {C}) = {w(A,B,C)}')
    
# ---------- Comment ----------
# format을 이용하여 print를 진행한다.

+ Recent posts