#include <bits/stdc++.h>
using namespace std;
int a[2010];
vector<int> v;
int main() {
  int n, b;
  cin >> n >> b;
  for (int i = (0); i < (n); ++i) cin >> a[i];
  v.push_back(b);
  for (int i = (0); i < (n - 1); ++i) {
    for (int j = (i + 1); j < (n); ++j) {
      if (a[j] > a[i]) v.push_back(b / a[i] * a[j] + b % a[i]);
    }
  }
  cout << *max_element(v.begin(), v.end());
  return 0;
}
