a=[] f={x,y,z->x>y?a[p=3g*y*z-x]=a[p]?:f(f(x-5,y,z),f(y-5,z,x),f(z-5,x,y)):z} System.in.eachLine{println f(it.split()*.toLong())}