#include <bits/stdc++.h>
using namespace std;
int main(){
  cout << fixed << setprecision(20);
  int N;
  cin >> N;
  int M = 1000000;
  vector<double> y(M + 1);
  for (int i = 0; i <= M; i++){
    double x = (double) i / M;
    y[i] = sqrt(pow(x, 3) + pow(N, 3));
  }
  double ans = 0;
  for (int i = 0; i < M; i++){
    ans += (y[i] + y[i + 1]) / 2 / M;
  }
  cout << ans << endl;
}