#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b;
  cin >> n >> b;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  int ans = b;
  for (auto iter = v.begin(); iter != (v.end() - 1); ++iter) {
    int rate = *iter;
    int dbought = b / rate;
    int bleft = b % rate;
    auto it = max_element(iter + 1, v.end());
    int bearned = dbought * (*it) + bleft;
    ans = max(ans, bearned);
  }
  cout << ans << endl;
  return 0;
}
