#include <bits/stdc++.h>
int d;
long long sqr(long long v) { return v * v; }
bool check1(int x, int i) {
  return sqr(3 * i + 5) + 3 * sqr(2 * x) <= 4 * sqr(d);
}
bool check2(int x, int i) {
  return sqr(3 * i + 5) + 3 * sqr(1 + 2 * x) <= 4 * sqr(d);
}
bool checkp(int x) { return 3 * sqr(1 + 2 * x) + 1 <= 4 * sqr(d); }
int main() {
  long long ans = 0;
  int lim = 1e6;
  std::cin >> d;
  for (int i = 1; i <= lim; i++) {
    int l = 0, r = (i + 1) / 2;
    if (i % 2 == 1) {
      if (!check1(l, i)) continue;
      while (l + 1 != r) {
        int mid = (l + r) >> 1;
        if (check1(mid, i))
          l = mid;
        else
          r = mid;
      }
      ans += 2 * l + 1;
    } else {
      if (!check2(l, i)) continue;
      while (l + 1 != r) {
        int mid = (l + r) >> 1;
        if (check2(mid, i))
          l = mid;
        else
          r = mid;
      }
      ans += 2 * l + 2;
    }
  }
  int k = 1;
  while (checkp(k)) k++;
  ans += k - 1;
  ans *= 6;
  ans++;
  std::cout << ans << std::endl;
  return 0;
}
