#include <bits/stdc++.h>
using namespace std;
const double sq = 1.73205080757;
int main() {
  long long k, k1;
  cin >> k;
  k1 = k * 2;
  k *= 2;
  k1 -= k1 % 3;
  k1++;
  if (k1 > k) k1 -= 3;
  long long h = 1, h1, an = 0;
  while (k1 > 0) {
    while (k1 * k1 + 3LL * h * h <= k * k &&
           (k1 + 1) * (k1 + 1) + 3LL * (h - 1) * (h - 1) <= k * k)
      h++;
    h--;
    if ((k1 - 1) % 6 == 0)
      h1 = max(h - (h % 2 == 0), 0LL);
    else
      h1 = h - h % 2;
    an += h1;
    k1 -= 3;
  }
  cout << an * 2 - h1 << endl;
}
