#include #include #include using namespace std; int main() { double R, H, D; cin >> R >> H >> D; double ans = 0; const double hmax = H * (1 - D / 2 / R), dh = H * 1e-7; for (double h = dh * 0.5; h < hmax; h += dh) { const double rh = R * (1 - h / H), theta = 2 * acos(D / 2 / rh); ans += dh * rh * rh * (theta - sin(theta)); } cout << setprecision(12) << ans << endl; }