#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int x, s;
long long ans, w[maxn];
double a, b, c;
inline int read() {
  int res, ok = 1;
  char ch;
  for (ch = getchar(); ch > '9' || ch < '0'; ch = getchar())
    if (ch == '-') ok = -1;
  res = ch - '0';
  for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
    res = res * 10 + ch - '0';
  return res;
}
inline int work(int x) {
  double nowx = x - 0.5, nowy = 0.5;
  for (int i = x; i >= 2; i--)
    if (nowx * nowx * 3 + nowy * nowy <= 1LL * x * x)
      return i;
    else
      nowx -= 1;
  return 0;
}
inline bool check(double nowx, double nowy) {
  if (nowx * nowx * 3 + nowy * nowy > 1LL * x * x) return 0;
  nowx -= 0.5;
  nowy += 0.5;
  if (nowx * nowx * 3 + nowy * nowy > 1LL * x * x) return 0;
  return 1;
}
int main() {
  x = read();
  if (x == 1 || x == 2) {
    cout << 1 << endl;
    return 0;
  }
  s = work(x);
  w[1] = 1LL;
  for (int i = 2; i <= 1e6; i++) w[i] = w[i - 1] + (i - 1) * 6LL;
  s--;
  ans = 2LL * s + 1;
  s++;
  a = s + 1;
  b = 2;
  while (a >= 0.5) {
    if (check(a, b)) {
      ans += a * 2LL * 2;
      b += 1.5;
      a += 0.5;
    } else {
      a -= 1;
    }
  }
  cout << ans << endl;
  return 0;
}
