#include <bits/stdc++.h>
using namespace std;
struct pt {
  double x;
  double y;
};
int dcmp(double x) { return x < -1e-8 ? -1 : x > 1e-8; }
double dis(pt p) { return (p.x * p.x) + (p.y * p.y); }
int n, edge;
double d = sqrt(3);
pt p;
pt p0, p1, p2;
int main() {
  int i, j, lf, rt, mid;
  int a, b;
  long long cnt = 0;
  long long res;
  while (scanf("%d", &n) != EOF) {
    lf = 0;
    rt = 50000000;
    while (lf <= rt) {
      mid = (lf + rt) / 2;
      p = (pt){0.5 * (3 * mid + 1), 0.5 * d * (mid + 1)};
      if (dcmp(dis(p) - (double)n * n) <= 0)
        lf = mid + 1;
      else
        rt = mid - 1;
    }
    a = lf;
    lf = 0;
    rt = 50000000;
    while (lf <= rt) {
      mid = (lf + rt) / 2;
      p = (pt){1 + 3.0 / 2 * mid, (mid % 2 == 0 ? 0 : d / 2)};
      if (dcmp(dis(p) - (double)n * n) <= 0)
        lf = mid + 1;
      else
        rt = mid - 1;
    }
    b = lf;
    for (i = 0, res = 1; i < a; i++) res += (long long)i * 6;
    for (i = a, cnt = 0; i < b; i++) {
      lf = 0, rt = i / 2;
      while (lf <= rt) {
        mid = (lf + rt) / 2;
        p0 = (pt){0.5 * (3 * i + 1), 0.5 * d * (i % 2 + 1 + 2 * mid)};
        p1 = (pt){0.5 * (3 * i + 2), 0.5 * d * (i % 2 + 2 * mid)};
        p2 = (pt){0.5 * (3 * i + 1), 0.5 * d * (i % 2 - 1 + 2 * mid)};
        if (dcmp(dis(p0) - double(n) * n) <= 0 &&
            dcmp(dis(p1) - double(n) * n) <= 0 &&
            dcmp(dis(p2) - double(n) * n) <= 0)
          lf = mid + 1;
        else
          rt = mid - 1;
      }
      cnt += 2 * lf;
      if (i % 2 == 0) cnt--;
    }
    res += 6 * cnt;
    cout << res << endl;
  }
  return 0;
}
