#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  long long R, ans = 1;
  cin >> R;
  for (long long i = 2;; ++i) {
    if (i % 2) {
      long long h = 1 + (i - 1) / 2 * 3;
      if (h > R) break;
      ans += 6 * min((long long)sqrt((R * R - h * h) / 3) * 2 + 1, i - 1);
    } else {
      double h = 2.5 + (i - 2) / 2 * 3;
      if (h > R) break;
      ans += 6 *
             min(((long long)(sqrt((R * R - h * h) / 3) - 0.5 + 1) * 2), i - 1);
    }
  }
  cout << ans << endl;
  return 0;
}
