#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using hex_coord = tuple<int, int, int>;
int x(const hex_coord& h) { return get<0>(h); }
int y(const hex_coord& h) { return get<1>(h); }
int z(const hex_coord& h) { return get<2>(h); }
ll xx[6], yy[6];
void gen_squared_quadrupled_vertices_flat_top(const hex_coord& h) {
  xx[0] = 9ll * x(h) * x(h) + 12 * x(h) + 4;
  yy[0] = 3ll * x(h) * x(h) + 12ll * x(h) * y(h) + 12ll * y(h) * y(h);
  xx[1] = 9ll * x(h) * x(h) - 12 * x(h) + 4;
  yy[1] = 3ll * x(h) * x(h) + 12ll * x(h) * y(h) + 12ll * y(h) * y(h);
  xx[2] = 9ll * x(h) * x(h) + 6 * x(h) + 1;
  yy[2] = 3ll * x(h) * x(h) + 12ll * x(h) * y(h) + 12ll * y(h) * y(h) +
          6 * x(h) + 12 * y(h) + 3;
  xx[3] = 9ll * x(h) * x(h) + 6 * x(h) + 1;
  yy[3] = 3ll * x(h) * x(h) + 12ll * x(h) * y(h) + 12ll * y(h) * y(h) -
          6 * x(h) - 12 * y(h) + 3;
  xx[4] = 9ll * x(h) * x(h) - 6 * x(h) + 1;
  yy[4] = 3ll * x(h) * x(h) + 12ll * x(h) * y(h) + 12ll * y(h) * y(h) +
          6 * x(h) + 12 * y(h) + 3;
  xx[5] = 9ll * x(h) * x(h) - 6 * x(h) + 1;
  yy[5] = 3ll * x(h) * x(h) + 12ll * x(h) * y(h) + 12ll * y(h) * y(h) -
          6 * x(h) - 12 * y(h) + 3;
}
template <typename T, typename Function>
T bsearch(T L, T R, const Function& can, bool left_feasible = true) {
  T& feasible = left_feasible ? L : R;
  T& infeasible = left_feasible ? R : L;
  while (R - L > 1) {
    T M = (L + R) / 2;
    (can(M) ? feasible : infeasible) = M;
  }
  return feasible;
}
bool in_range(const hex_coord& h, ll k) {
  gen_squared_quadrupled_vertices_flat_top(h);
  bool ans = true;
  for (int i = 0; i < 6; i++) {
    ans &= xx[i] + yy[i] <= 4 * k * k;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int k;
  cin >> k;
  int max_x = bsearch(0, k + 1, [k](int x) {
    return in_range({x, -x / 2, -(x + 1) / 2}, k);
  });
  ll ans = 0;
  for (int x = -max_x; x <= max_x; x++) {
    ans += (x % 2) + 1 + 2 * bsearch(0, k + 1, [x, k](int y_offset) {
                           int y = -x / 2 + y_offset;
                           return in_range({x, y, -(x + y)}, k);
                         });
  }
  cout << ans << '\n';
  return 0;
}
