#include <bits/stdc++.h>
using namespace std;
int a[2000];
int main() {
  int n, b, res;
  while (cin >> n >> b) {
    res = b;
    for (int i = 0; i < n; ++i) cin >> a[i];
    for (int i = 0; i < n; ++i) {
      for (int j = i + 1; j < n; ++j) {
        int m = b / a[i];
        res = max(res, m * a[j] + b - m * a[i]);
      }
    }
    cout << res << endl;
  }
  return 0;
}
