#include <bits/stdc++.h>
using namespace std;
const double dis = sqrt(3.0);
int n;
int main() {
  scanf("%d", &n);
  double len = 0.5, hor_len;
  long long tmp, ans = 0, cur;
  for (int i = 0; len <= n; len += 1.5, ++i) {
    hor_len = sqrt((double)n * n - len * len);
    if (i % 2 == 0) {
      if (hor_len < dis / 2.0) continue;
      hor_len -= dis / 2.0;
      cur = (((long long)(hor_len / dis)) * 2 + 1) * 2;
    } else
      cur = ((long long)(hor_len / dis)) * 4;
    hor_len = sqrt((double)n * n - (len + 0.5) * (len + 0.5));
    if (i % 2) {
      if (hor_len < dis / 2.0) continue;
      hor_len -= dis / 2.0;
      cur = min(cur, ((long long)(hor_len / dis) + 1) * 4);
    } else
      cur = min(cur, ((long long)(hor_len / dis) * 2 + 1) * 2);
    if (i == 0) tmp = cur / 2;
    ans += cur;
  }
  printf("%I64d\n", ans - tmp);
  return 0;
}
