#include <bits/stdc++.h>
using namespace std;
const double sqrt3 = sqrt(3.0);
const double EPS = 1E-9;
inline double calc(double x, double y) { return sqrt(x * x + y * y); }
int ok(double x, double y, int n) {
  if (calc(x + 0.5, y + 0.5 * sqrt3) > n + EPS) return 0;
  if (calc(x + 1, y) > n + EPS) return 0;
  return 1;
}
int main() {
  long long n, res = 0;
  cin >> n;
  for (int i = 0; i * sqrt3 < n; ++i) {
    int lo = 0, hi = n;
    for (; lo + 1 < hi;) {
      int m = (lo + hi) / 2;
      if (ok(1.5 * m, (i + m * 0.5) * sqrt3, n)) {
        lo = m;
      } else {
        hi = m;
      }
    }
    res += lo;
  }
  cout << res * 6 + 1 << endl;
}
