#include <bits/stdc++.h>
using namespace std;
long long get(long long k) {
  if (k == 1) return 1;
  return (k - 1) * 6;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  long long ans = 0;
  for (long long i = 1; i <= n; ++i) {
    double mxlen = sqrt(0.75) * (2 * i - 1);
    if (n * n >= mxlen * mxlen + 0.5 * 0.5) {
      ans += get(i);
    } else {
      if (i >= 3) {
        if (i % 2 == 1) {
          double x = i + (i - 1) / 2;
          long long l = -1;
          long long r = (i - 3) / 2 + 1;
          while (l + 1 != r) {
            long long m = (l + r) / 2;
            if (n * n >= 3 * m * m + x * x) {
              l = m;
            } else {
              r = m;
            }
          }
          if (l == -1) continue;
          ans += (1 + (l)*2) * 6;
        } else {
          double x = i - 1 + (i - 2) / 2 + 1 + 0.5;
          long long l = -1;
          long long r = (i - 2) / 2 + 1;
          while (l + 1 != r) {
            long long m = (l + r) / 2;
            if (m == 0) {
              if (n * n >= x * x) {
                l = m;
              } else {
                r = m;
              }
            } else {
              if (n * n >= 0.75 * (2 * m - 1) * (2 * m - 1) + x * x) {
                l = m;
              } else {
                r = m;
              }
            }
          }
          if (l == -1) continue;
          ans += (l)*2 * 6;
        }
      }
    }
  }
  cout << ans;
}
