#include <bits/stdc++.h>
using namespace std;
const int dx[] = {2, 1, -1, -2, -1, 1};
const int dy[] = {0, 1, 1, 0, -1, -1};
const double eps = 1e-9;
int n;
bool check(long long x, long long y) {
  for (int i = 0; i < 6; ++i) {
    long long x1 = x + dx[i], y1 = y + dy[i];
    if (x1 * x1 + y1 * y1 * 3 > 4ll * n * n) return false;
  }
  return true;
}
int main() {
  cin >> n;
  long long ans = 0;
  for (int i = 0;; ++i) {
    if (i % 2 == 0) {
      int l = 0, r = n;
      while (l < r) {
        int mid = (l + r) >> 1;
        if (check(i * 3, mid * 2))
          l = mid + 1;
        else
          r = mid;
      }
      if (l == 0)
        break;
      else
        ans += (2 * l - 1) * (1 + bool(i));
    } else {
      int l = 1, r = n;
      while (l < r) {
        int mid = (l + r) >> 1;
        if (check(i * 3, (2 * mid - 1)))
          l = mid + 1;
        else
          r = mid;
      }
      ans += 2 * (2 * l - 2);
    }
  }
  printf("%lld\n", ans);
  return 0;
}
