#include <bits/stdc++.h>
using namespace std;
long long int ABS(long long int a) {
  if (a < 0) return (-a);
  return a;
}
int main() {
  long long int n, b;
  int mx[2001], val[2001];
  cin >> n >> b;
  for (int i = (0); i < (n); ++i) cin >> val[i];
  mx[n - 1] = val[n - 1];
  for (int i = (n - 2); i >= (0); --i) mx[i] = max(val[i], mx[i + 1]);
  int index = -1, greatest_difference = 0;
  for (int i = (0); i < (n); ++i) {
    if ((int(b / val[i])) * (mx[i] - val[i]) > greatest_difference &&
        val[i] <= b) {
      index = i;
      greatest_difference = (int(b / val[index])) * (mx[i] - val[i]);
    }
  }
  if (index != -1) b += greatest_difference;
  cout << b << endl;
  return 0;
}
