#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
int main() {
  int n, b;
  cin >> n >> b;
  vector<int> v(n, 0);
  for (int i = 0; i < n; ++i) cin >> v[i];
  int ans = b;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (v[j] > v[i]) {
        int curd = b / v[i];
        ans = max(ans, (b % v[i]) + (v[j] * curd));
      }
    }
  }
  cout << ans << endl;
  return 0;
}
