#include <bits/stdc++.h>
static const int MOD = 1000000007;
using ll = long long;
using uint = unsigned;
using ull = unsigned long long;
using namespace std;
template <class T>
constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;
int main() {
  ll k;
  cin >> k;
  ll ans = 1, e = 0;
  for (ll d = 1;; ++d) {
    while (true) {
      if (d < 2 * e) {
        cout << ans << "\n";
        return 0;
      }
      if (3 * d * d + 3 * e * e + 3 * d - 3 * d * e + 1 <= k * k) break;
      e++;
    }
    if (!e)
      ans += 6 * d;
    else
      ans += 6 * (d - 2 * e + 1);
  }
  return 0;
}
