#include <bits/stdc++.h>
using namespace std;
template <typename T>
string tostr(const T& t) {
  ostringstream os;
  os << t;
  return os.str();
}
long long big = 2000000000010LL;
int main() {
  int n, b;
  cin >> n;
  cin >> b;
  vector<int> a(n);
  for (int i = (int)(0); i <= (int)(n - 1); ++i) {
    cin >> a[i];
  }
  int mx = b;
  for (int i = (int)(0); i <= (int)(n - 1); ++i) {
    if (a[i] > b) continue;
    for (int j = (int)(i + 1); j <= (int)(n - 1); ++j) {
      int dol = b / a[i];
      int spent = dol * a[i];
      int left = b - spent;
      int buy = dol * a[j];
      int tot = left + buy;
      mx = max(mx, tot);
    }
  }
  cout << mx << endl;
  return 0;
}
