func_code_string: #include <bits/stdc++.h>   using namespace std;   signed main() {     ios_base::sync_with_stdio(0);     long long n, k, m;     cin >> n >> k >> m;     vector<long long> a(k);     long long second = 0;     for (long long i = 0; i < k; i++) {       cin >> a[i];       second += a[i];     }     sort(a.begin(), a.end());     long long ans = 0;     for (long long p = 0; p <= n; p++) {       long long t = m - second * p;       long long kol = 0;       if (t < 0) break;       kol = p * (k + 1);       for (long long j = 0; j < k; j++) {         long long ost = n - p;         while (ost > 0 && t - a[j] >= 0) {           ost--;           t -= a[j];           kol++;         }       }       ans = max(ans, kol);     }     cout << ans;     return 0;   }   