func_code_string: #include <bits/stdc++.h>   using namespace std;   inline long long sqr(int a) { return a * 1ll * a; }   int main() {     int k;     cin >> k;     int len = k;     int cnt = 0;     int x = 0;     long long res = 0;     while (x <= 2 * k) {       if (!(cnt & 1)) {         int best = 0;         int l = 1, r = k;         while (l <= r) {           int m = (l + r) / 2;           if ((sqr(x + 2) + sqr(m - 1) * 12 <= sqr(k) * 4) &&               (sqr(x + 1) + sqr(2 * m - 1) * 3 <= sqr(k) * 4)) {             best = m;             l = m + 1;           } else             r = m - 1;         }         if (best) {           if (x) res += best * 2 - 1;           res += best * 2 - 1;         }       } else {         int best = 0;         int l = 1, r = k;         while (l <= r) {           int m = (l + r) / 2;           if ((sqr(x + 2) + sqr(2 * m - 1) * 3 <= sqr(k) * 4) &&               (sqr(x + 1) + sqr(m) * 12 <= sqr(k) * 4)) {             best = m;             l = m + 1;           } else             r = m - 1;         }         if (x) res += best * 2;         res += best * 2;       }       x += 3;       cnt++;     }     cout << res << endl;     return 0;   }   