import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class Main {
static Map<String,Long> map=new HashMap<>();
public static void main(String[] args) throws Exception{
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
long a=0;
long b=0;
long c=0;
while(true){
StringTokenizer st=new StringTokenizer(reader.readLine());
a=Long.parseLong(st.nextToken());
b=Long.parseLong(st.nextToken());
c=Long.parseLong(st.nextToken());
if(a==-1 && b==-1 && c==-1){
break;
}else{
//System.out.println(p(a,b,c));
System.out.printf("w(%d, %d, %d) = %d \n",a,b,c,p(a,b,c));
}
}
reader.close();
}
public static long p(long a,long b,long c){
String key=String.valueOf(a)+"_"+String.valueOf(b)+"_"+String.valueOf(c);
if(map.containsKey(key)){
return map.get(key);
}
long v=0l;
if(a<=0 || b<=0 || c<=0){
v=1l;
}else if(a>20 || b>20 || c>20){
v=p(20,20,20);
}else if(a<b && b<c){
v=p(a,b,c-1)+p(a,b-1,c-1)-p(a,b-1,c);
}else{
v= p(a-1,b,c)+p(a-1,b-1,c)+p(a-1,b,c-1)-p(a-1,b-1,c-1);
}
map.put(key,v);
return v;
}
}