#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
int main() {
  long long r;
  double pi = 2 * acos(0.0);
  cin >> r;
  double ccos[6], csin[6];
  for (int i = 0; i < (6); i++) {
    ccos[i] = cos(i / 3.0 * pi);
    csin[i] = sin(i / 3.0 * pi);
  }
  long long ans = 0;
  double sq3 = sqrt(3.0);
  for (long long y = -r; y <= r; y++) {
    double lx = -3 * r;
    double rx = 3 * r;
    int f = 0;
    for (int i = 0; i < (6); i++) {
      double dx = ccos[i];
      double dy = csin[i];
      double nx = dx + 1.5 * y;
      double ny = y * sq3 * .5 + dy;
      if (abs(nx) > r) {
        f = 1;
        break;
      }
      double llx = -sqrt(r * r - nx * nx) - ny;
      double rrx = sqrt(r * r - nx * nx) - ny;
      llx /= sq3;
      rrx /= sq3;
      lx = max(lx, llx);
      rx = min(rx, rrx);
    }
    if (f) continue;
    double eps = 1e-8;
    lx -= eps;
    rx += eps;
    int tlx = lx - 5;
    while (tlx < lx) tlx++;
    int trx = rx + 5;
    while (trx > rx) trx--;
    if (trx >= tlx) {
      ans += trx - tlx + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
