func_code_string: #include <bits/stdc++.h>   using namespace std;   const long double pi = acos(-1);   long long a[200002] = {};   long long b[200002] = {};   long long c[200002] = {};   string s =   , ss =   ;   long long n, m, k, w;   long long ans, ans1;   long long mod = 1e9 + 7;   int main() {     cin.tie(0);     cin.sync_with_stdio(0);     int t = 1;     while (t--) {       cin >> n >> m;       for (int i = 0; i < n; i++) cin >> a[i];       ;       b[n - 1] = a[n - 1];       for (int i = n - 2; i >= 0; i--) b[i] = max(b[i + 1], a[i]);       c[0] = a[0];       for (long long i = 1; i < n; i++) c[i] = min(a[i], c[i - 1]);       ans = m;       for (long long i = 0; i < n - 1; i++) {         k = m / c[i];         k *= b[i + 1];         k += m % c[i];         ans = max(ans, k);       }       cout << ans;     }     return 0;   }   