#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; cin >> n; auto f = [&](double x) { return sqrt(x * x * x + n * n); }; double ans = 0; int int_num = 1e4; for (int i = 0; i < int_num; i++) { double l = (double)i / int_num; double r = (double)(i + 1) / int_num; ans += (r - l) / 6 * (f(l) + 4 * f((l + r) / 2) + f(r)); } cout << setprecision(16) << fixed << ans << endl; }