var a,b,h: double; begin readln(a,b,h); write(a+b+2*(sqrt(sqr((b-a)/2)+sqr(h)))); end.