#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  long long res = 0;
  for (int i = 1; i < k / 2; ++i) res += i * 6;
  bool s = false;
  for (int i = k / 2;; ++i) {
    s = false;
    int tt = 0;
    if (sqrt((i * sqrt((double)3) + sqrt((double)3) / 2) *
                 (i * sqrt((double)3) + sqrt((double)3) / 2) +
             0.25) <= k) {
      res += 6 * i;
      s = s || true;
      continue;
    }
    if (i % 2 != 0) {
      int aa = 0, bb = i / 2 - 1;
      int j = i / 4;
      while (aa <= bb) {
        double a = ((double)((i * 2) - (((int)i) / 2))) + 0.5;
        double b = (sqrt((double)3) / 2.0 + sqrt((double)3) * j);
        double x = sqrt(a * a + b * b);
        if (x <= k) {
          tt = 6 * ((j + 1) * 2);
          if (aa == j)
            ++aa;
          else
            aa = j;
          j = (aa + bb) / 2;
          s = true;
        } else {
          if (bb == j)
            --bb;
          else
            bb = j;
          j = (j + aa) / 2;
        }
      }
    } else {
      int aa = 0, bb = i / 2;
      int j = i / 4;
      while (aa <= bb) {
        double a = (double)3 * (((int)i) / 2) + 1;
        if (sqrt(((double)3) * j * j + a * a) <= k) {
          tt = 6 * (j * 2 + 1);
          if (aa == j)
            ++aa;
          else
            aa = j;
          j = (aa + bb) / 2;
          s = true;
        } else {
          if (bb == j)
            --bb;
          else
            bb = j;
          j = (j + aa) / 2;
        }
      }
    }
    res += tt;
    if (!s) break;
  }
  cout << res + 1;
  return 0;
}
