#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
const long long inf = 1e17 + 7;
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cout.precision(10);
  long long n;
  cin >> n;
  long long res = 0;
  long long h = 0;
  for (long long i = 1e6; i >= 0; i--) {
    h = max(0ll, h - 2);
    while (true) {
      double y = (double)i / 2 * 3;
      double x = sqrt(3) * h;
      if (i % 2 != 0) {
        x += sqrt(3) / 2;
      }
      double dist1 = hypot(x, y + 1);
      double dist2 = hypot(x + sqrt(3) / 2, y + 0.5);
      if (max(dist1, dist2) - n <= 1e-9)
        h++;
      else
        break;
    }
    res += 2 * h;
    if (i % 2 == 0 && h != 0) res--;
    if (i == 1) res *= 2;
  }
  cout << res;
}
