#include <bits/stdc++.h>
using namespace std;
int k;
long long ans;
int main() {
  scanf("%d", &k);
  ans = 1;
  long double l, h, d, c, t;
  d = sqrt(3.0) / 2;
  l = 1.0;
  for (int i = 2; i < k + 1; ++i) {
    h = 0.0;
    c = 0.0;
    if ((i & 1) == 0) {
      l += 1.0;
      h += 0.5;
      c = d;
    } else
      l += 2.0;
    h += l;
    t = h * h + c * c - k * 1ll * k;
    if (t > 1e-16) break;
    int mi = 0, ma = (i - 1) / 2, ms;
    for (int j = 0; j < 100; ++j) {
      ms = (mi + ma + 1) / 2;
      t = h * h + (c + 2 * d * ms) * (c + 2 * d * ms) - k * 1ll * k;
      if (t < 1e-16)
        mi = ms;
      else
        ma = ms;
    }
    ms = 2 * (mi + 1);
    if ((i & 1) == 1) --ms;
    if (ms == i)
      ans += (ms - 1) * 6;
    else
      ans += ms * 6;
  }
  printf("%I64d", ans);
  return 0;
}
