#include <bits/stdc++.h>
#define pi 3.14159265359
using namespace std;
int main() {
long double a,b,c,r;
cin >> a >> b >> c >> r;
long double s =(a+b+c)/2;
long double S =0;
long double x =acos((a*a+b*b-c*c)/2/a/b)/2;
S -=r*r/tan(x);
S +=(pi-2*x)/2*r*r;
x =acos((a*a+c*c-b*b)/2/a/c)/2;
S -=r*r/tan(x);
S +=(pi-2*x)/2*r*r;
x =acos((b*b+c*c-a*a)/2/b/c)/2;
S -=r*r/tan(x);
S +=(pi-2*x)/2*r*r;
cout << fixed << setprecision(10) << 1+S/sqrt(s*(s-a)*(s-b)*(s-c)) << "\n";
return 0;}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgcGkgMy4xNDE1OTI2NTM1OQp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGRvdWJsZSBhLGIsYyxyOwoJY2luID4+IGEgPj4gYiA+PiBjID4+IHI7Cglsb25nIGRvdWJsZSBzID0oYStiK2MpLzI7Cglsb25nIGRvdWJsZSBTID0wOwoJbG9uZyBkb3VibGUgeCA9YWNvcygoYSphK2IqYi1jKmMpLzIvYS9iKS8yOwoJUyAtPXIqci90YW4oeCk7CglTICs9KHBpLTIqeCkvMipyKnI7Cgl4ID1hY29zKChhKmErYypjLWIqYikvMi9hL2MpLzI7CglTIC09cipyL3Rhbih4KTsKCVMgKz0ocGktMip4KS8yKnIqcjsKCXggPWFjb3MoKGIqYitjKmMtYSphKS8yL2IvYykvMjsKCVMgLT1yKnIvdGFuKHgpOwoJUyArPShwaS0yKngpLzIqcipyOwoJY291dCA8PCBmaXhlZCA8PCBzZXRwcmVjaXNpb24oMTApIDw8IDErUy9zcXJ0KHMqKHMtYSkqKHMtYikqKHMtYykpIDw8ICJcbiI7CglyZXR1cm4gMDt9