#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, x = 1, y = 1, c, res;
  cin >> r;
  c = 4 * r * r;
  for (; c >= 1 + 3 * (y + 2) * (y + 2);) {
    y += 2;
  }
  res = y;
  for (; x + 4 <= 2 * r;) {
    x += 3;
    y++;
    for (; (c < x * x + 3 * y * y) ||
           (c < (x + 1) * (x + 1) + 3 * (y - 1) * (y - 1));) {
      y -= 2;
    }
    res += 2 * y;
  }
  cout << res << endl;
  return 0;
}
