#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, e, f, g, h, i, j, k;
long long R;
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  friend Point operator+(const Point &x, const Point &y) {
    return Point(x.x + y.x, x.y + y.y);
  }
  friend Point operator-(const Point &x, const Point &y) {
    return Point(x.x - y.x, x.y - y.y);
  }
};
struct Point U, D;
struct Point G[10];
struct Point T[10];
struct Point H;
struct Point E[10];
double u, v, w;
long long an;
bool In_Circle(Point x) {
  long long ii, jj;
  ii = (long long)round(x.x / 0.5);
  jj = (long long)round(x.y / u);
  if (ii * ii + 3 * jj * jj <= 4 * R * R) return true;
  return false;
}
bool check(Point x) {
  long long ii;
  for (ii = 1; ii <= 6; ii++) E[ii] = x + G[ii];
  for (ii = 1; ii <= 6; ii++)
    if (!In_Circle(E[ii])) return false;
  return true;
}
long long In(Point x, Point y) {
  return (long long)round((x.y - y.y) / (u * 2)) + 1;
}
int main() {
  scanf("%I64d", &R);
  u = sqrt(3.0) / 2;
  G[1] = Point(-0.5, u);
  G[2] = Point(0.5, u);
  G[3] = Point(-1, 0);
  G[4] = Point(1, 0);
  G[5] = Point(-0.5, -u);
  G[6] = Point(0.5, -u);
  T[1] = G[1] + G[3];
  T[2] = G[5] + G[3];
  H = Point(0, u * 2);
  U = D = Point(0, 0);
  while (check(U)) U = U + H;
  U = U - H;
  while (check(D)) D = D - H;
  D = D + H;
  an = b = In(U, D);
  while (1) {
    U = U + T[2];
    D = D + T[1];
    while (check(U)) U = U + H;
    U = U - H;
    while (check(D)) D = D - H;
    D = D + H;
    while (U.y + 1e-3 >= D.y && !check(U)) U = U - H;
    if (U.y + 1e-3 < D.y) break;
    while (U.y + 1e-3 >= D.y && !check(D)) D = D + H;
    if (U.y + 1e-3 < D.y) break;
    an += In(U, D);
  }
  an = an * 2 - b;
  printf("%I64d\n", an);
  return 0;
}
