#include <bits/stdc++.h>
using namespace std;
long long sqr(long long x) { return x * x; }
bool poss(long long k, long long m, long long Rs) {
  bool ok = 1;
  if (k < 0) k = -k;
  for (int px = -1; px <= 1; px += 2) {
    for (int py = -1; py <= 1; py += 2) {
      if (sqr(3 * k + px) + 3 * sqr(2 * m + (k % 2) + py) > 4 * Rs) ok = 0;
    }
    if (sqr(3 * k + 2 * px) + 3 * sqr(2 * m + (k % 2)) > 4 * Rs) ok = 0;
  }
  return ok;
}
int sgn(int x) {
  if (x <= 0)
    return 1;
  else
    return -1;
}
int main() {
  int R;
  scanf("%d", &R);
  long long Rs = (long long)R * (long long)R;
  long long answer = 0;
  long long low = 0;
  for (long long k = -R; k <= 0; k++) {
    if (!poss(k, low, Rs) && low > 0) low--;
    while (poss(k, low + 1, Rs)) low++;
    if (poss(k, low, Rs)) {
      if (k & 1) {
        answer += 4 * (low + 1);
      } else {
        answer += (k == 0 ? 1 : 2) * (2 * low + 1);
      }
    }
  }
  printf("%lld\n", answer);
}
