#include <bits/stdc++.h>
using namespace std;
const double PI =
    3.14159265358979323846264338327950288419716939937510582097494459230;
struct debugger {
  static void call(const char *arg) {}
  template <typename T, typename... aT>
  static void call(const char *it, T a, aT... rest) {
    string b;
    for (; *it && (*it) != ','; it++) {
      b += *it;
    }
    cerr << b << " = " << a << " ";
    call(++it, rest...);
  }
};
int main() {
  int n, b, m;
  cin >> n >> b;
  int ar[n];
  m = b;
  for (int i = 0; i < (n); i++) {
    cin >> ar[i];
  }
  for (int i = 0; i < (n); i++) {
    int c = b / ar[i], r = b % ar[i];
    for (int j = (i + 1); j < (n); j++) {
      int w = ar[j] * c;
      w = w + r;
      m = max(w, m);
    }
  }
  cout << m;
}
