#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
// 记忆化搜索 不要傻傻地递归下去算
// 可以观察到 参数最大就是20 开一个三维数组完全存的下
// 输入数据完全是唬人的
// 按照规则递归计算 如果当前参数已经存储了 直接返回
// 没有就算出来 再存下来 方便下一次用到
typedef long long ll;
int n;
ll a,b,c;
ll res[30][30][30];
ll w(ll a,ll b,ll 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 (res[a][b][c]==0) {
if (a<b and b<c) res[a][b][c]=w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c);
else res[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 res[a][b][c];
}
void slove() {
while (scanf ("%lld %lld %lld",&a,&b,&c)!=EOF) {
if (a==-1 and b==-1 and c==-1) break;
printf ("w(%lld, %lld, %lld) = %lld\n",a,b,c,w(a,b,c));
//cout<<w(a,b,c)<<'\n';;
}
return ;
}
int main () {
slove();
return 0;
}