func_code_string: #include <bits/stdc++.h>   using namespace std;   unsigned long long k, n, d = 0, ans;   string s;   unsigned long long int sol1(int k);   int main() {     cin >> s;     n = s.size();     cin >> k;     ans = max(0ULL, min(2 * k, n + k - ((n + k) % 2)));     ans = max(ans, sol1(k));     cout << ans << endl;     const clock_t begin_time = clock();     return 0;   }   unsigned long long int sol1(int t) {     int bop = 0;     int anss = 0;     for (int i = 0; i < n; i++) {       for (int j = 1; j <= n; j++) {         bop = 0;         if (i + 2 * j - 1 >= n + t) {           bop = 1;         } else           for (int k = 0; k < j; k++) {             if (i + j + k < n) {               if (s[i + k] != s[i + j + k]) {                 bop = 1;                 break;               }             }           }         if (bop == 0) {           anss = max(anss, 2 * j);         }       }     }     return anss;   }   