a≧b≧c≧d≧e≧1

f(a,b,c,d,e)=f(a-1,b,c,d,e)+2n+1

n = max { a, f(b-1,c,d,e) }
+ max { b, f(c-1,d,e) }
+ max { c, f(d-1,e) }
+ e