#include<bits/stdc++.h>
using namespace std;
long long a,b,c, m[30][30][30];
long long w(long long a,long long b,long long c) {
if(a<=0||b<=0||c<=0) return 1;
if(a>20||b>20||c>20) return w(20,20,20);
if(a<b&&b<c) {
if(m[a][b][c-1]==0) m[a][b][c-1]=w(a,b,c-1);
if(m[a][b-1][c-1]==0) m[a][b-1][c-1]=w(a,b-1,c-1);
if(m[a][b-1][c]==0) m[a][b-1][c]=w(a,b-1,c);
m[a][b][c]=m[a][b][c-1]+m[a][b-1][c-1]-m[a][b-1][c];
}
else{
if(m[a-1][b][c-1]==0) m[a-1][b][c-1]=w(a-1,b,c-1);
if(m[a-1][b-1][c-1]==0) m[a-1][b-1][c-1]=w(a-1,b-1,c-1);
if(m[a-1][b-1][c]==0) m[a-1][b-1][c]=w(a-1,b-1,c);
if(m[a-1][b][c]==0) m[a-1][b][c]=w(a-1,b,c);
m[a][b][c]=m[a-1][b][c]+m[a-1][b-1][c]+m[a-1][b][c-1]-m[a-1][b-1][c-1];
}
return m[a][b][c];
}
int main() {
while(cin>>a>>b>>c) {
if(a==-1&&b==-1&&c==-1) {
return 0;
} else {
cout<<"w("<<a<<","<<b<<","<<c<<")="<<w(a,b,c)<<"\n";
}
}
return 0;
}