#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 9;
const double eps = 1e-9;
const long long inf = 2e15 + 9;
const long long mod = 2016;
long long ans[maxn];
int main() {
  long long k;
  while (~scanf("%lld", &k)) {
    long long x = 0, y = k;
    long long ans = 0;
    for (; y >= 0; x++) {
      for (; y >= 0; y--) {
        long long nx = 3 * x + 1, ny = 2 * y + 1;
        if (x & 1) ny++;
        if (nx * nx + 3 * ny * ny > 4 * k * k) continue;
        nx++, ny--;
        if (nx * nx + 3 * ny * ny > 4 * k * k) continue;
        break;
      }
      if (y < 0) break;
      long long go = y;
      go = (go + 1) * 2;
      if (!(x & 1)) go--;
      if (x == 0)
        ans += go;
      else
        ans += 2 * go;
      y++;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
