#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = (n)-1; i >= 0; --i) #define chmax(a, b) a = max(a, b) #define chmin(a, b) a = min(a, b) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() using ll = long long; using P = pair; using VI = vector; using VVI = vector; using VL = vector; using VVL = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(12); double rmax, h, d; cin >> rmax >> h >> d; const double rmin = d / 2; constexpr int num = 3e7; const double rstep = (rmax - rmin) / num; double ans = 0; rep(i, num) { //for(double r = rmin; r < rmax; r += rstep) { const double r = rmin + rstep * i; double t = acos(d / 2 / r); //ans += r * r * (2 * t - sin(2 * t)); double x = 2 * t; double x2 = x * x; double z = 1; for(int i = 20; i >= 4; i -= 2) { z = 1 - x2 / (i * (i + 1)) * z; } z = r * r * x * x2 / 6 * z; //ans += r * r * (x2 * x / 6 * (1 - x2 / 20 * (1 - x2 / 42 * (1 - x2 / 72 * (1 - x2 / 110 * (1 - x2 / 156)))))); ans += z; } ans *= rstep * h / rmax; cout << ans << endl; }