function f(x,y,z){if(!(r=c[x,y,z])){r=c[x,y,z]=x>y?f(f(x-5,y,z),f(y-5,z,x),f(z-5,x,y)):z}return r}{print f($1,$2,$3)}