#include <bits/stdc++.h>
using namespace std;
double d = sqrt(3.);
bool check(long long n, double dx, double dy, long long r) {
  dy += d * n;
  return dx * dx + dy * dy <= r * r;
}
int main() {
  long long k;
  cin >> k;
  long long ans = 1;
  double dx, dy;
  for (int i = 2;; ++i) {
    if (i & 1) {
      dx = 1.5 * (i - 1) + 1;
      dy = 0;
      if (dx > k)
        break;
      else
        ans += 6;
    } else {
      dx = 1.5 * (i - 1) + 1;
      dy = -d / 2;
    }
    int l = 0, r = i / 2, mid;
    while (l < r) {
      mid = (l + r + 1) / 2;
      if (check(mid, dx, dy, k))
        l = mid;
      else
        r = mid - 1;
    }
    if (l && check(l, dx, dy, k)) ans += l * 12 - (l == i / 2) * 6;
  }
  cout << ans << endl;
  return 0;
}
