#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef double db;
template<class T1,class T2> bool cmin(T1 &x,const T2 &y) { if (y<x) { x=y; return 1; }return 0; }
template<class T1,class T2> bool cmax(T1 &x,const T2 &y) { if (x<y) { x=y; return 1; }return 0; }
#define all(x) (x).begin(),(x).end()
db solve(db a,db b,db x)
{
a/=b;
db c=a*x*x,d=x*x;
return sqrt(d*d+c)-d;
}
const db pi=acos(-1);
int main()
{
ios::sync_with_stdio(0); cin.tie(0);
cout<<fixed<<setprecision(15);
// int T; cin>>T;
double h,r,a,b;
cin>>h>>r>>a>>b;
b-=a;
double x=h/2;
auto y=solve(a,b,x);sfg
cerr<<y<<endl;
db vol=(pi*r*r*y);
cout<<vol<<'\n';
}