#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T bpow(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
const double b = sqrt(3.0) / 2.0;
const double eps = 1e-6;
double r;
double BS(double h) {
  double l, u, x, q;
  l = b;
  u = r;
  q = 0.0;
  while (u - l > eps) {
    x = (l + u) / 2.0;
    if ((x * x + h * h <= r * r &&
         (x - b) * (x - b) + (h + 0.5) * (h + 0.5) <= r * r)) {
      q = x;
      l = x;
    } else
      u = x;
  }
  return q;
}
int main() {
  int i, n;
  long long int res = 0, p;
  double h = 0.5, x, d;
  cin >> n;
  r = n * 1.0 + eps;
  x = BS(h);
  if (x >= b) {
    p = 1;
    x -= b;
    p += (long long int)floor(x / (2.0 * b)) * (long long int)2;
    res += p;
  }
  h += 1.5;
  i = 0;
  while (h <= r) {
    x = BS(h);
    if (i % 2 == 1) {
      if (x >= b) {
        p = 1;
        x -= b;
        p += (long long int)floor(x / (2.0 * b)) * (long long int)2;
        res += p * 2LL;
      }
    } else {
      if (x >= 2.0 * b) {
        p = (long long int)floor(x / (2.0 * b)) * (long long int)2;
        res += p * 2LL;
      }
    }
    i++;
    h += 1.5;
  }
  cout << res << endl;
  return 0;
}
